diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 8ebcef611..1cbe1ec79 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -2035,6 +2035,22 @@ bool Thermostat::set_control(const char * value, const int8_t id) { write_command(set_typeids[hc->hc()], 1, ctrl); return true; } + } else if (model() == EMSdevice::EMS_DEVICE_FLAG_BC400) { + if (Helpers::value2enum(value, ctrl, FL_(enum_control2))) { + write_command(hpmode_typeids[hc->hc()], 3, ctrl); + hc->control = ctrl; // set in advance, dont wait for verify + if (hc->remotetemp != EMS_VALUE_INT16_NOTSET && ctrl > 0) { + if (ctrl == 2) { + Roomctrl::set_remotetemp(Roomctrl::RC100, hc->hc(), hc->remotetemp); + } else if (ctrl == 3) { + Roomctrl::set_remotetemp(Roomctrl::RC100H, hc->hc(), hc->remotetemp); + } else { + hc->remotetemp = EMS_VALUE_INT16_NOTSET; + Roomctrl::set_remotetemp(0, hc->hc(), hc->remotetemp); + } + } + return true; + } } else if (isRC300() || model() == EMSdevice::EMS_DEVICE_FLAG_RC100) { if (Helpers::value2enum(value, ctrl, FL_(enum_control1))) { write_command(hpmode_typeids[hc->hc()], 3, ctrl); @@ -4428,7 +4444,11 @@ void Thermostat::register_device_values_hc(std::shared_ptrdewoffset, DeviceValueType::UINT8, FL_(dewoffset), DeviceValueUOM::K, MAKE_CF_CB(set_dewoffset), 2, 10); register_device_value(tag, &hc->roomtempdiff, DeviceValueType::UINT8, FL_(roomtempdiff), DeviceValueUOM::K, MAKE_CF_CB(set_roomtempdiff)); register_device_value(tag, &hc->hpminflowtemp, DeviceValueType::UINT8, FL_(hpminflowtemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_hpminflowtemp)); - register_device_value(tag, &hc->control, DeviceValueType::ENUM, FL_(enum_control1), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control)); + if (model == EMSdevice::EMS_DEVICE_FLAG_BC400) { + register_device_value(tag, &hc->control, DeviceValueType::ENUM, FL_(enum_control2), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control)); + } else { + register_device_value(tag, &hc->control, DeviceValueType::ENUM, FL_(enum_control1), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control)); + } register_device_value(tag, &hc->remotetemp, DeviceValueType::INT16, diff --git a/src/locale_common.h b/src/locale_common.h index 787272ffd..442d8cc79 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -180,6 +180,9 @@ MAKE_NOTRANSLATION(rc200, "RC200") MAKE_NOTRANSLATION(rc100, "RC100") MAKE_NOTRANSLATION(rc100h, "RC100H") MAKE_NOTRANSLATION(tc100, "TC100") +MAKE_NOTRANSLATION(rc120rf, "RC120RF") +MAKE_NOTRANSLATION(rc220, "RC220") +MAKE_NOTRANSLATION(single, "single") MAKE_NOTRANSLATION(dash, "-") MAKE_NOTRANSLATION(BLANK, "") MAKE_NOTRANSLATION(pwm, "pwm") @@ -342,6 +345,7 @@ MAKE_ENUM(enum_j_control, FL_(off), FL_(fb10), FL_(fb100)) MAKE_ENUM(enum_roomsensor, FL_(extern), FL_(intern), FL_(auto)) MAKE_ENUM(enum_roominfluence, FL_(off), FL_(intern), FL_(extern), FL_(auto)) MAKE_ENUM(enum_control1, FL_(rc310), FL_(rc200), FL_(rc100), FL_(rc100h), FL_(tc100)) +MAKE_ENUM(enum_control2, FL_(off), FL_(dash), FL_(rc100), FL_(rc100h), FL_(dash), FL_(rc120rf), FL_(rc220), FL_(single)) // BC400 MAKE_ENUM(enum_switchmode, FL_(off), FL_(eco), FL_(comfort), FL_(heat))