set heatingTemp, burnMaxPower,...

This commit is contained in:
MichaelDvP
2023-02-24 16:40:24 +01:00
parent 1fa1ee5b24
commit e9bd1d4b81

View File

@@ -881,7 +881,7 @@ void Boiler::check_active(const bool force) {
EMSESP::tap_water_active(b); // let EMS-ESP know, used in the Shower class EMSESP::tap_water_active(b); // let EMS-ESP know, used in the Shower class
} }
if (!Helpers::hasValue(forceHeatingOff_, true)) { if (!Helpers::hasValue(forceHeatingOff_, EMS_VALUE_BOOL)) {
EMSESP::webSettingsService.read([&](WebSettings & settings) { forceHeatingOff_ = (settings.boiler_heatingoff || selFlowTemp_ == 0) ? 1 : 0; }); EMSESP::webSettingsService.read([&](WebSettings & settings) { forceHeatingOff_ = (settings.boiler_heatingoff || selFlowTemp_ == 0) ? 1 : 0; });
has_update(&forceHeatingOff_); has_update(&forceHeatingOff_);
} }
@@ -2599,9 +2599,9 @@ bool Boiler::set_wwAltOpPrio(const char * value, const int8_t id) {
bool Boiler::set_forceHeatingOff(const char * value, const int8_t id) { bool Boiler::set_forceHeatingOff(const char * value, const int8_t id) {
bool v; bool v;
if (Helpers::value2bool(value, v)) { if (Helpers::value2bool(value, v)) {
forceHeatingOff_ = v; has_update(forceHeatingOff_, v);
if (!v) { if (!v && Helpers::hasValue(heatingTemp_)) {
uint8_t data[] = {heatingTemp_, 0x64}; uint8_t data[] = {heatingTemp_, (Helpers::hasValue(burnMaxPower_) ? burnMaxPower_ : (uint8_t)100), (Helpers::hasValue(pumpModMax_) ? pumpModMax_ : (uint8_t)0), 0};
write_command(EMS_TYPE_UBASetPoints, 0, data, sizeof(data), 0); write_command(EMS_TYPE_UBASetPoints, 0, data, sizeof(data), 0);
} }
return true; return true;