mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
feat: added OT option dhwStateAsDhwBlocking
For Baxi Slim with Bertelli
This commit is contained in:
@@ -205,6 +205,12 @@ protected:
|
||||
summerWinterMode = vars.master.heating.enabled == summerWinterMode;
|
||||
}
|
||||
|
||||
// DHW blocking
|
||||
bool dhwBlocking = settings.opentherm.options.dhwBlocking;
|
||||
if (settings.opentherm.options.dhwStateAsDhwBlocking) {
|
||||
dhwBlocking = vars.master.dhw.enabled == dhwBlocking;
|
||||
}
|
||||
|
||||
unsigned long response = this->instance->setBoilerStatus(
|
||||
vars.master.heating.enabled,
|
||||
vars.master.dhw.enabled,
|
||||
@@ -212,7 +218,7 @@ protected:
|
||||
settings.opentherm.options.nativeHeatingControl,
|
||||
vars.master.ch2.enabled,
|
||||
summerWinterMode,
|
||||
settings.opentherm.options.dhwBlocking,
|
||||
dhwBlocking,
|
||||
statusLb
|
||||
);
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ struct Settings {
|
||||
bool heatingToCh2 = false;
|
||||
bool dhwToCh2 = false;
|
||||
bool dhwBlocking = false;
|
||||
bool dhwStateAsDhwBlocking = false;
|
||||
bool maxTempSyncWithTargetTemp = true;
|
||||
bool getMinMaxTemp = true;
|
||||
bool ignoreDiagState = false;
|
||||
|
||||
@@ -68,6 +68,7 @@ const char S_DATE[] PROGMEM = "date";
|
||||
const char S_DEADBAND[] PROGMEM = "deadband";
|
||||
const char S_DHW[] PROGMEM = "dhw";
|
||||
const char S_DHW_BLOCKING[] PROGMEM = "dhwBlocking";
|
||||
const char S_DHW_STATE_AS_DHW_BLOCKING[] PROGMEM = "dhwStateAsDhwBlocking";
|
||||
const char S_DHW_SUPPORT[] PROGMEM = "dhwSupport";
|
||||
const char S_DHW_TO_CH2[] PROGMEM = "dhwToCh2";
|
||||
const char S_DIAG[] PROGMEM = "diag";
|
||||
|
||||
10
src/utils.h
10
src/utils.h
@@ -461,6 +461,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
||||
otOptions[FPSTR(S_HEATING_TO_CH2)] = src.opentherm.options.heatingToCh2;
|
||||
otOptions[FPSTR(S_DHW_TO_CH2)] = src.opentherm.options.dhwToCh2;
|
||||
otOptions[FPSTR(S_DHW_BLOCKING)] = src.opentherm.options.dhwBlocking;
|
||||
otOptions[FPSTR(S_DHW_STATE_AS_DHW_BLOCKING)] = src.opentherm.options.dhwStateAsDhwBlocking;
|
||||
otOptions[FPSTR(S_MAX_TEMP_SYNC_WITH_TARGET_TEMP)] = src.opentherm.options.maxTempSyncWithTargetTemp;
|
||||
otOptions[FPSTR(S_GET_MIN_MAX_TEMP)] = src.opentherm.options.getMinMaxTemp;
|
||||
otOptions[FPSTR(S_IGNORE_DIAG_STATE)] = src.opentherm.options.ignoreDiagState;
|
||||
@@ -923,6 +924,15 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
||||
}
|
||||
}
|
||||
|
||||
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_DHW_STATE_AS_DHW_BLOCKING)].is<bool>()) {
|
||||
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_DHW_STATE_AS_DHW_BLOCKING)].as<bool>();
|
||||
|
||||
if (value != dst.opentherm.options.dhwStateAsDhwBlocking) {
|
||||
dst.opentherm.options.dhwStateAsDhwBlocking = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_MAX_TEMP_SYNC_WITH_TARGET_TEMP)].is<bool>()) {
|
||||
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_MAX_TEMP_SYNC_WITH_TARGET_TEMP)].as<bool>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user