From b45dc92159f2e1c4b6fe95d53a8beb1b5d770f8d Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 27 Jun 2020 14:57:01 +0200 Subject: [PATCH] publish thermostat wwMode --- src/devices/thermostat.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 76dbf1f32..81acbb3b1 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -494,6 +494,15 @@ void Thermostat::publish_values() { 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) { Mqtt::publish("thermostat_data", doc); rootThermostat = doc.to(); // clear object