diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index 0618b626c..7c209cae5 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -1684,7 +1684,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) { myDebug_P(PSTR("MQTT topic: thermostat HC%d mode value %s"), hc, message); if (strcmp((char *)message, "auto") == 0) { ems_setThermostatMode(2, hc); - } else if (strcmp((char *)message, "day") == 0 || strcmp((char *)message, "manual") == 0) { + } else if (strcmp((char *)message, "day") == 0 || (strcmp((char *)message, "manual") == 0) || (strcmp((char *)message, "heat") == 0)) { ems_setThermostatMode(1, hc); } else if (strcmp((char *)message, "night") == 0 || strcmp((char *)message, "off") == 0) { ems_setThermostatMode(0, hc); @@ -1698,7 +1698,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) { float f = strtof((char *)message, 0); char s[10] = {0}; myDebug_P(PSTR("MQTT topic: new thermostat HC%d night temperature value %s"), hc, _float_to_char(s, f)); - ems_setThermostatTemp(f, hc, 1); + ems_setThermostatTemp(f, hc, 1); // night return; } @@ -1708,7 +1708,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) { float f = strtof((char *)message, 0); char s[10] = {0}; myDebug_P(PSTR("MQTT topic: new thermostat HC%d day temperature value %s"), hc, _float_to_char(s, f)); - ems_setThermostatTemp(f, hc, 2); + ems_setThermostatTemp(f, hc, 2); // day return; } @@ -1718,7 +1718,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) { float f = strtof((char *)message, 0); char s[10] = {0}; myDebug_P(PSTR("MQTT topic: new thermostat HC%d holiday temperature value %s"), hc, _float_to_char(s, f)); - ems_setThermostatTemp(f, hc, 3); + ems_setThermostatTemp(f, hc, 3); // holiday return; } diff --git a/src/ems.cpp b/src/ems.cpp index cf6843073..ebf162add 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -2713,7 +2713,7 @@ void ems_setThermostatTemp(float temperature, uint8_t hc_num, uint8_t temptype) EMS_TxTelegram.action = EMS_TX_TELEGRAM_WRITE; EMS_TxTelegram.dest = device_id; - myDebug_P(PSTR("Setting new thermostat temperature for heating circuit %d"), hc_num); + myDebug_P(PSTR("Setting new thermostat temperature for heating circuit %d type %d (0=none,1=night,2=day,3=holiday)"), hc_num, temptype); if (model_id == EMS_MODEL_RC20) { EMS_TxTelegram.type = EMS_TYPE_RC20Set; @@ -2825,7 +2825,7 @@ void ems_setThermostatMode(uint8_t mode, uint8_t hc_num) { } } - myDebug_P(PSTR("Setting thermostat mode to %d for heating circuit"), mode, hc_num); + myDebug_P(PSTR("Setting thermostat mode to %d for heating circuit %d"), mode, hc_num); _EMS_TxTelegram EMS_TxTelegram = EMS_TX_TELEGRAM_NEW; // create new Tx EMS_TxTelegram.timestamp = millis(); // set timestamp