From ffb90b8f9a4d5fe0da860e1f3b5a3c469c086209 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 28 Jan 2026 15:01:57 +0100 Subject: [PATCH] comfortpoint temperature and offset, #2935 --- src/core/locale_translations.h | 2 ++ src/devices/thermostat.cpp | 36 ++++++++++++++++++++++++++++++++++ src/devices/thermostat.h | 5 +++++ 3 files changed, 43 insertions(+) diff --git a/src/core/locale_translations.h b/src/core/locale_translations.h index d1116e7e9..319fcda82 100644 --- a/src/core/locale_translations.h +++ b/src/core/locale_translations.h @@ -754,6 +754,8 @@ MAKE_TRANSLATION(roomTemp, "currtemp", "current room temperature", "aktuelle Rau MAKE_TRANSLATION(mode, "mode", "operating mode", "Betriebsart", "Modus", "Läge", "sposób sterowania", "modus", "mode", "mod", "modalità", "režim", "provozní režim") MAKE_TRANSLATION(modetype, "modetype", "mode type", "Modustyp", "Type modus", "Typ av läge", "aktualny tryb pracy", "modusrype", "type mode", "mod tipi", "tipo di modalita", "typ režimu", "typ režimu") MAKE_TRANSLATION(fastheatup, "fastheatup", "fast heatup", "schnelles Aufheizen", "Snel opwarmen", "Snabb Uppvärmning", "szybkie nagrzewanie", "rask oppvarming", "chauffage rapide", "hızlı ısıtma", "riscaldamento rapido", "rýchle zahriatie", "rychlé předehřátí") +MAKE_TRANSLATION(comfortPointTemp, "comftemp", "comfort point temperature", "Komfortpunkt Temperatur", "", "", "", "", "", "", "", "", "") +MAKE_TRANSLATION(comfortPointOffset, "comfoffset", "comfort point offset", "Komfortpunkt Anhebung", "", "", "", "", "", "", "", "", "") MAKE_TRANSLATION(heatup, "heatup", "heatup", "Aufheizen", "opwarmen", "Uppvärmning", "nagrzewanie", "oppvarming", "chauffage", "hızlı", "riscaldamento", "rýchle zahriatie", "předehřev") MAKE_TRANSLATION(daytemp, "daytemp", "day temperature", "Tagestemperatur", "temperatuur dag", "Dagstemperatur", "temperatura w dzień", "dagtemperatur", "température jour", "gündüz sıcaklığı", "temperatura giornaliera", "denná teplota", "denní teplota") MAKE_TRANSLATION(daylowtemp, "daytemp2", "day temperature T2", "Tagestemperatur T2", "Temperatuur dag T2", "Dagstemperatur T2", "temperatura w dzień T2", "dagtemperatur T2", "température jour T2", "gündüz sıcaklığı T2", "temperatura giornaliera T2", "denná teplota T2", "denní teplota T2") diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index bbefe086b..b88a22e6c 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1235,6 +1235,8 @@ void Thermostat::process_RC300Summer(std::shared_ptr telegram) { } has_update(telegram, hc->fastHeatup, 10); + has_update(telegram, hc->comfortPointOffset, 11); + has_update(telegram, hc->comfortPointTemp, 12); } // types 0x471 ff summer2_typeids @@ -3326,6 +3328,33 @@ bool Thermostat::set_fastheatup(const char * value, const int8_t id) { return true; } +// https://github.com/emsesp/EMS-ESP32/issues/2935 +bool Thermostat::set_comfortPointTemp(const char * value, const int8_t id) { + auto hc = heating_circuit(id); + if (hc == nullptr) { + return false; + } + int set; + if (!Helpers::value2temperature(value, set)) { + return false; + } + write_command(summer_typeids[hc->hc()], 12, set, summer_typeids[hc->hc()]); + return true; +} + +bool Thermostat::set_comfortPointOffset(const char * value, const int8_t id) { + auto hc = heating_circuit(id); + if (hc == nullptr) { + return false; + } + int set; + if (!Helpers::value2temperature(value, set, true)) { + return false; + } + write_command(summer_typeids[hc->hc()], 11, set, summer_typeids[hc->hc()]); + return true; +} + // Set holidaymode Junkers bool Thermostat::set_holidaymode(const char * value, const int8_t id) { auto hc = heating_circuit(id); @@ -4878,6 +4907,13 @@ void Thermostat::register_device_values_hc(std::shared_ptrcooltemp, DeviceValueType::INT8, DeviceValueNumOp::DV_NUMOP_DIV2, FL_(cooltemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_cooltemp), -1, 30); register_device_value(tag, &hc->fastHeatup, DeviceValueType::UINT8, FL_(fastheatup), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_fastheatup)); + register_device_value(tag, + &hc->comfortPointOffset, + DeviceValueType::UINT8, + FL_(comfortPointOffset), + DeviceValueUOM::DEGREES_R, + MAKE_CF_CB(set_comfortPointOffset)); + register_device_value(tag, &hc->comfortPointTemp, DeviceValueType::UINT8, FL_(comfortPointTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_comfortPointTemp)); register_device_value(tag, &hc->switchonoptimization, DeviceValueType::BOOL, diff --git a/src/devices/thermostat.h b/src/devices/thermostat.h index 2bc1e18fc..aba59e5c5 100644 --- a/src/devices/thermostat.h +++ b/src/devices/thermostat.h @@ -89,6 +89,9 @@ class Thermostat : public EMSdevice { uint8_t statusbyte; // from RC300monitor uint8_t switchProgMode; int8_t redThreshold; + // BC400 + uint8_t comfortPointTemp; + uint8_t comfortPointOffset; // RC 10 uint8_t reducehours; // night reduce duration uint16_t reduceminutes; // remaining minutes to night->day @@ -505,6 +508,8 @@ class Thermostat : public EMSdevice { bool set_controlmode(const char * value, const int8_t id); bool set_wwprio(const char * value, const int8_t id); bool set_fastheatup(const char * value, const int8_t id); + bool set_comfortPointTemp(const char * value, const int8_t id); + bool set_comfortPointOffset(const char * value, const int8_t id); bool set_switchonoptimization(const char * value, const int8_t id); bool set_heatondelay(const char * value, const int8_t id); bool set_heatoffdelay(const char * value, const int8_t id);