mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
move HA climate to mqtt
This commit is contained in:
10
src/mqtt.h
10
src/mqtt.h
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user