clean up boolean, move to MQTT screen

This commit is contained in:
proddy
2021-02-23 17:45:48 +01:00
parent 1d64285f09
commit b2e85ee026
16 changed files with 53 additions and 68 deletions

View File

@@ -50,6 +50,8 @@ using uuid::console::Shell;
#define MAX_MQTT_MESSAGES 20
#endif
enum { BOOL_FORMAT_ONOFF = 1, BOOL_FORMAT_TRUEFALSE, BOOL_FORMAT_10 }; // matches Web UI settings
namespace emsesp {
using mqtt_subfunction_p = std::function<bool(const char * message)>;
@@ -156,6 +158,10 @@ class Mqtt {
return dallas_format_;
}
static uint8_t bool_format() {
return bool_format_;
}
static bool ha_enabled() {
return ha_enabled_;
}
@@ -265,6 +271,7 @@ class Mqtt {
static uint32_t publish_time_sensor_;
static bool mqtt_enabled_;
static uint8_t dallas_format_;
static uint8_t bool_format_;
static uint8_t ha_climate_format_;
static bool ha_enabled_;
};