diff --git a/src/ems-esp.ino b/src/ems-esp.ino index 4ed652b31..bf09ad0be 100644 --- a/src/ems-esp.ino +++ b/src/ems-esp.ino @@ -1,6 +1,6 @@ /* * EMS-ESP - * + * * Paul Derbyshire - https://github.com/proddy/EMS-ESP * * See ChangeLog.md for history @@ -737,8 +737,10 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) { myDebug("MQTT topic: thermostat mode value %s", message); if (strcmp((char *)message, "auto") == 0) { ems_setThermostatMode(2); - } else if (strcmp((char *)message, "manual") == 0) { + } else if (strcmp((char *)message, "day") == 0) { ems_setThermostatMode(1); + } else if (strcmp((char *)message, "night") == 0) { + ems_setThermostatMode(0); } } @@ -863,7 +865,7 @@ void _showerColdShotStop() { } } -/* +/* * Shower Logic */ void showerCheck() { diff --git a/src/ems.h b/src/ems.h index b7a74f918..f251c5e7f 100644 --- a/src/ems.h +++ b/src/ems.h @@ -212,6 +212,7 @@ typedef struct { float setpoint_roomTemp; // current set temp float curr_roomTemp; // current room temp uint8_t mode; // 0=low, 1=manual, 2=auto + bool day_mode; // 0=night, 1=day uint8_t hour; uint8_t minute; uint8_t second;