diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index d1c084506..138e2974e 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -767,10 +767,10 @@ void publishValues(bool force) { doc.clear(); JsonObject rootSM = doc.to(); - if (abs(EMS_Other.SMcollectorTemp) < EMS_VALUE_SHORT_NOTSET) + if (abs(EMS_Other.SMcollectorTemp) != EMS_VALUE_SHORT_NOTSET) rootSM[SM_COLLECTORTEMP] = (double)EMS_Other.SMcollectorTemp / 10; - if (abs(EMS_Other.SMbottomTemp) < EMS_VALUE_SHORT_NOTSET) + if (abs(EMS_Other.SMbottomTemp) != EMS_VALUE_SHORT_NOTSET) rootSM[SM_BOTTOMTEMP] = (double)EMS_Other.SMbottomTemp / 10; if (EMS_Other.SMpumpModulation != EMS_VALUE_INT_NOTSET) @@ -780,13 +780,13 @@ void publishValues(bool force) { rootSM[SM_PUMP] = _bool_to_char(s, EMS_Other.SMpump); } - if (abs(EMS_Other.SMEnergyLastHour) < EMS_VALUE_SHORT_NOTSET) + if (abs(EMS_Other.SMEnergyLastHour) != EMS_VALUE_SHORT_NOTSET) rootSM[SM_ENERGYLASTHOUR] = (double)EMS_Other.SMEnergyLastHour / 10; - if (abs(EMS_Other.SMEnergyToday) < EMS_VALUE_SHORT_NOTSET) + if (abs(EMS_Other.SMEnergyToday) != EMS_VALUE_SHORT_NOTSET) rootSM[SM_ENERGYTODAY] = EMS_Other.SMEnergyToday; - if (abs(EMS_Other.SMEnergyTotal) < EMS_VALUE_SHORT_NOTSET) + if (abs(EMS_Other.SMEnergyTotal) != EMS_VALUE_SHORT_NOTSET) rootSM[SM_ENERGYTOTAL] = (double)EMS_Other.SMEnergyTotal / 10; data[0] = '\0'; // reset data for next package diff --git a/src/ems.cpp b/src/ems.cpp index 3e10e4d0b..48ae1dc66 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -1829,7 +1829,8 @@ void ems_getOtherValues() { } /** - * returns current thermostat type as a string + * returns current thermostat type as a string + * by looking up the product_id */ char * ems_getThermostatDescription(char * buffer) { uint8_t size = 128;