mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
always send thermostat MQTT even if there is not current temp detected
This commit is contained in:
@@ -846,13 +846,13 @@ void publishValues(bool force) {
|
|||||||
|
|
||||||
// handle the thermostat values
|
// handle the thermostat values
|
||||||
if (ems_getThermostatEnabled()) {
|
if (ems_getThermostatEnabled()) {
|
||||||
uint8_t total_active_hc = 0; // number of HCs
|
uint8_t total_active_hc = 0; // number of HCs
|
||||||
bool hc_1_active = EMS_Thermostat.hc[0].active; // do we have HC1 active?
|
bool hc_1_active = EMS_Thermostat.hc[EMS_THERMOSTAT_DEFAULTHC - 1].active; // do we have HC1 active?
|
||||||
for (uint8_t hc_v = 1; hc_v <= EMS_THERMOSTAT_MAXHC; hc_v++) {
|
for (uint8_t hc_v = 1; hc_v <= EMS_THERMOSTAT_MAXHC; hc_v++) {
|
||||||
_EMS_Thermostat_HC * thermostat = &EMS_Thermostat.hc[hc_v - 1];
|
_EMS_Thermostat_HC * thermostat = &EMS_Thermostat.hc[hc_v - 1];
|
||||||
|
|
||||||
// only send if we have an active Heating Circuit with real data
|
// only send if we have an active Heating Circuit with real data
|
||||||
if ((thermostat->active) && (thermostat->curr_roomTemp != EMS_VALUE_SHORT_NOTSET) && (thermostat->setpoint_roomTemp != EMS_VALUE_SHORT_NOTSET)) {
|
if (thermostat->active) {
|
||||||
total_active_hc++; // increase count for #HCs we encounter
|
total_active_hc++; // increase count for #HCs we encounter
|
||||||
|
|
||||||
// build new json object
|
// build new json object
|
||||||
|
|||||||
Reference in New Issue
Block a user