diff --git a/src/ems.cpp b/src/ems.cpp index fd492b5b6..8238c7d1a 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -1887,22 +1887,32 @@ void ems_getThermostatValues() { uint8_t type = EMS_Thermostat.device_id; uint8_t hc = EMS_Thermostat.hc; - if (model_id == EMS_MODEL_RC20) { - ems_doReadCommand(EMS_TYPE_RC20StatusMessage, type); // to get the setpoint temp + switch (model_id) { + case EMS_MODEL_RC20: + ems_doReadCommand(EMS_TYPE_RC20StatusMessage, type); // to get the temps ems_doReadCommand(EMS_TYPE_RC20Set, type); // to get the mode - } else if (model_id == EMS_MODEL_RC30) { - ems_doReadCommand(EMS_TYPE_RC30StatusMessage, type); // to get the setpoint temp + break; + case EMS_MODEL_RC30: + ems_doReadCommand(EMS_TYPE_RC30StatusMessage, type); // to get the temps ems_doReadCommand(EMS_TYPE_RC30Set, type); // to get the mode - } else if ((model_id == EMS_MODEL_RC35) || (model_id == EMS_MODEL_ES73)) { + break; + case EMS_MODEL_EASY: + ems_doReadCommand(EMS_TYPE_EasyStatusMessage, type); + break; + case EMS_MODEL_RC35: + case EMS_MODEL_ES73: if (hc == 1) { - ems_doReadCommand(EMS_TYPE_RC35StatusMessage_HC1, type); // to get the setpoint temp + ems_doReadCommand(EMS_TYPE_RC35StatusMessage_HC1, type); // to get the temps ems_doReadCommand(EMS_TYPE_RC35Set_HC1, type); // to get the mode } else if (hc == 2) { - ems_doReadCommand(EMS_TYPE_RC35StatusMessage_HC2, type); // to get the setpoint temp + ems_doReadCommand(EMS_TYPE_RC35StatusMessage_HC2, type); // to get the temps ems_doReadCommand(EMS_TYPE_RC35Set_HC2, type); // to get the mode } - } else if ((model_id == EMS_MODEL_EASY)) { - ems_doReadCommand(EMS_TYPE_EasyStatusMessage, type); + break; + case EMS_MODEL_RC300: + ems_doReadCommand(EMS_TYPE_RCPLUSStatusMessage, type); + default: + break; } ems_doReadCommand(EMS_TYPE_RCTime, type); // get Thermostat time diff --git a/src/version.h b/src/version.h index 19c02c23d..c0cec732e 100644 --- a/src/version.h +++ b/src/version.h @@ -6,5 +6,5 @@ #pragma once #define APP_NAME "EMS-ESP" -#define APP_VERSION "1.8.1b18" +#define APP_VERSION "1.8.1b19" #define APP_HOSTNAME "ems-esp"