Fix HomeAssisant Thermostat integration

Things like translations work proper with the auto/manual/off messages. Also it allows for working buttons in HA.
This commit is contained in:
Xeyame
2019-04-05 22:38:10 +02:00
parent 53a4106dff
commit dfa1d5e7a7
2 changed files with 5 additions and 5 deletions

View File

@@ -1233,9 +1233,9 @@ 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, "day") == 0) {
} else if (strcmp((char *)message, "day") == 0 || strcmp((char *)message, "manual") == 0) {
ems_setThermostatMode(1);
} else if (strcmp((char *)message, "night") == 0) {
} else if (strcmp((char *)message, "night") == 0 || strcmp((char *)message, "off") == 0) {
ems_setThermostatMode(0);
}
}