feat: added opentherm option 'immergasFix'

This commit is contained in:
Yurii
2024-10-01 01:32:35 +03:00
parent 790ff5a011
commit 7658aeaa8c
7 changed files with 36 additions and 4 deletions

View File

@@ -354,6 +354,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
dst["opentherm"]["modulationSyncWithHeating"] = src.opentherm.modulationSyncWithHeating;
dst["opentherm"]["getMinMaxTemp"] = src.opentherm.getMinMaxTemp;
dst["opentherm"]["nativeHeatingControl"] = src.opentherm.nativeHeatingControl;
dst["opentherm"]["immergasFix"] = src.opentherm.immergasFix;
dst["mqtt"]["enable"] = src.mqtt.enable;
dst["mqtt"]["server"] = src.mqtt.server;
@@ -800,6 +801,15 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
}
}
if (src["opentherm"]["immergasFix"].is<bool>()) {
bool value = src["opentherm"]["immergasFix"].as<bool>();
if (value != dst.opentherm.immergasFix) {
dst.opentherm.immergasFix = value;
changed = true;
}
}
// mqtt
if (src["mqtt"]["enable"].is<bool>()) {