mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 17:29:50 +03:00
publish thermostat wwMode
This commit is contained in:
@@ -494,6 +494,15 @@ void Thermostat::publish_values() {
|
|||||||
rootThermostat["building"] = "heavy";
|
rootThermostat["building"] = "heavy";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Helpers::hasValue(wwMode_)) {
|
||||||
|
if (wwMode_ == 0) {
|
||||||
|
rootThermostat["wwmode"] = "off";
|
||||||
|
} else if (wwMode_ == 1) {
|
||||||
|
rootThermostat["wwmode"] = "on";
|
||||||
|
} else if (wwMode_ == 2) {
|
||||||
|
rootThermostat["wwmode"] = "auto";
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mqtt_format_ == Settings::MQTT_format::SINGLE) {
|
if (mqtt_format_ == Settings::MQTT_format::SINGLE) {
|
||||||
Mqtt::publish("thermostat_data", doc);
|
Mqtt::publish("thermostat_data", doc);
|
||||||
rootThermostat = doc.to<JsonObject>(); // clear object
|
rootThermostat = doc.to<JsonObject>(); // clear object
|
||||||
|
|||||||
Reference in New Issue
Block a user