diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 63edd3326..f45bf8605 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -851,11 +851,11 @@ void Boiler::process_UBAParameterWW(std::shared_ptr telegram) { // has_bitupdate(telegram, wwEquipt_,0,3); // 8=boiler has ww has_update(telegram, wwActivated_, 1); // 0xFF means on has_update(telegram, wwSelTemp_, 2); - has_update(telegram, wwHystOn_, 3); // Hyst on (default -5) - has_update(telegram, wwHystOff_, 4); // Hyst off (default -1) - has_update(telegram, wwFlowTempOffset_, 5); // default 40 - has_update(telegram, wwCircPump_, 6); // 0xFF means on - has_update(telegram, wwCircMode_, 7); // 1=1x3min 6=6x3min 7=continuous + has_update(telegram, wwHystOn_, 3); // Hyst on (default -5) + has_update(telegram, wwHystOff_, 4); // Hyst off (default -1) + has_update(telegram, wwFlowTempOffset_, 5); // default 40 + has_update(telegram, wwCircPump_, 6); // 0xFF means on + has_enumupdate(telegram, wwCircMode_, 7, 1); // 1=1x3min 6=6x3min 7=continuous has_update(telegram, wwDisinfectionTemp_, 8); has_bitupdate(telegram, wwChargeType_, 10, 0); // 0 = charge pump, 0xff = 3-way valve @@ -1028,7 +1028,7 @@ void Boiler::process_UBAParameterWWPlus(std::shared_ptr telegram has_update(telegram, wwHystOff_, 8); has_update(telegram, wwFlowTempOffset_, 9); has_update(telegram, wwCircPump_, 10); // 0x01 means yes - has_update(telegram, wwCircMode_, 11); // 1=1x3min... 6=6x3min, 7=continuous + has_enumupdate(telegram, wwCircMode_, 11, 1); // 1=1x3min... 6=6x3min, 7=continuous has_update(telegram, wwDisinfectionTemp_, 12); // setting here, status in E9 has_update(telegram, wwSelTempSingle_, 16); has_update(telegram, wwSelTempLow_, 18); @@ -2188,24 +2188,15 @@ bool Boiler::set_ww_circulation_pump(const char * value, const int8_t id) { // Set the mode of circulation, 1x3min, ... 6x3min, continuous // true = on, false = off bool Boiler::set_ww_circulation_mode(const char * value, const int8_t id) { - int v; - if (!Helpers::value2number(value, v)) { - return false; - } - - if (v < 7) { - // LOG_INFO("Setting dhw circulation mode %dx3min", v); - } else if (v == 7) { - // LOG_INFO("Setting dhw circulation mode continuous"); - } else { - // LOG_WARNING("Set dhw circulation mode: Invalid value"); + uint8_t v; + if (!Helpers::value2enum(value, v, FL_(enum_freq))) { return false; } if (is_fetch(EMS_TYPE_UBAParameterWWPlus)) { - write_command(EMS_TYPE_UBAParameterWWPlus, 11, v, EMS_TYPE_UBAParameterWWPlus); + write_command(EMS_TYPE_UBAParameterWWPlus, 11, v + 1, EMS_TYPE_UBAParameterWWPlus); } else { - write_command(EMS_TYPE_UBAParameterWW, 7, v, EMS_TYPE_UBAParameterWW); + write_command(EMS_TYPE_UBAParameterWW, 7, v + 1, EMS_TYPE_UBAParameterWW); } return true; diff --git a/src/locale_common.h b/src/locale_common.h index 06ca5156f..3165001e0 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -245,7 +245,7 @@ MAKE_PSTR_ENUM(enum_progMode, FL_(prog1), FL_(prog2)) MAKE_PSTR_ENUM(enum_progMode4, FL_(proga), FL_(progb), FL_(progc), FL_(progd), FL_(proge), FL_(progf)) MAKE_PSTR_ENUM(enum_climate, FL_(seltemp), FL_(roomtemp)) MAKE_PSTR_ENUM(enum_charge, FL_(chargepump), FL_(3wayvalve)) -MAKE_PSTR_ENUM(enum_freq, FL_(off), FL_(1x3min), FL_(2x3min), FL_(3x3min), FL_(4x3min), FL_(5x3min), FL_(6x3min), FL_(continuous)) +MAKE_PSTR_ENUM(enum_freq, FL_(1x3min), FL_(2x3min), FL_(3x3min), FL_(4x3min), FL_(5x3min), FL_(6x3min), FL_(continuous)) MAKE_PSTR_ENUM(enum_off_time_date_manual, FL_(off), FL_(time), FL_(date), FL_(manual)) MAKE_PSTR_ENUM(enum_comfort, FL_(hot), FL_(eco), FL_(intelligent)) MAKE_PSTR_ENUM(enum_comfort1, FL_(high_comfort), FL_(eco))