move HA climate to mqtt

This commit is contained in:
MichaelDvP
2022-02-23 10:29:56 +01:00
parent 833ddf15d5
commit 24216d7b4f
6 changed files with 126 additions and 196 deletions

View File

@@ -107,6 +107,7 @@ class Mqtt {
const JsonObject & dev_json);
static void publish_system_ha_sensor_config(uint8_t type, const __FlashStringHelper * name, const __FlashStringHelper * entity, const uint8_t uom);
static void publish_ha_climate_config(uint8_t tag, bool has_roomtemp, bool remove = false);
static void show_topic_handlers(uuid::console::Shell & shell, const uint8_t device_type);
static void show_mqtt(uuid::console::Shell & shell);
@@ -191,6 +192,14 @@ class Mqtt {
ha_enabled_ = ha_enabled;
}
static bool ha_climate_reset() {
return ha_climate_reset_;
}
static void ha_climate_reset(bool reset) {
ha_climate_reset_ = reset;;
}
static bool send_response() {
return send_response_;
}
@@ -276,6 +285,7 @@ class Mqtt {
static bool initialized_;
static uint32_t mqtt_publish_fails_;
static uint8_t connectcount_;
static bool ha_climate_reset_;
// settings, copied over
static std::string mqtt_base_;