From 65ae347b720814ad4dfaabd0438d1656aba568ee Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 15 Feb 2020 14:01:06 +0100 Subject: [PATCH] only send thermostat mqtt data if we have actual temperature values --- src/ems-esp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index d1f7bdb5a..0774c133a 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -725,8 +725,8 @@ void publishEMSValues(bool force) { for (uint8_t hc_v = 1; hc_v <= EMS_THERMOSTAT_MAXHC; hc_v++) { _EMS_Thermostat_HC * thermostat = &EMS_Thermostat.hc[hc_v - 1]; - // only send if we have an active Heating Circuit with real data - if (thermostat->active) { + // only send if we have an active Heating Circuit with actual temperature values + if ((thermostat->active) && (thermostat->setpoint_roomTemp > EMS_VALUE_SHORT_NOTSET) && (thermostat->curr_roomTemp > EMS_VALUE_SHORT_NOTSET)) { // build new json object char hc[10]; // hc{1-4} strlcpy(hc, THERMOSTAT_HC, sizeof(hc));