feat: added setting to enable/disable polling of min and max temperatures via opentherm

This commit is contained in:
Yurii
2024-04-06 15:51:49 +03:00
parent 53eaa1d7f1
commit b0e0f6fd7d
5 changed files with 32 additions and 18 deletions

View File

@@ -283,6 +283,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
dst["opentherm"]["dhwToCh2"] = src.opentherm.dhwToCh2;
dst["opentherm"]["dhwBlocking"] = src.opentherm.dhwBlocking;
dst["opentherm"]["modulationSyncWithHeating"] = src.opentherm.modulationSyncWithHeating;
dst["opentherm"]["getMinMaxTemp"] = src.opentherm.getMinMaxTemp;
dst["mqtt"]["server"] = src.mqtt.server;
dst["mqtt"]["port"] = src.mqtt.port;
@@ -500,6 +501,11 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
changed = true;
}
if (src["opentherm"]["getMinMaxTemp"].is<bool>()) {
dst.opentherm.getMinMaxTemp = src["opentherm"]["getMinMaxTemp"].as<bool>();
changed = true;
}
// mqtt
if (!src["mqtt"]["server"].isNull()) {