mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-12 11:14:28 +05:00
add parameter for max modulation
This commit is contained in:
@@ -27,6 +27,7 @@ protected:
|
||||
Log.sinfoln("MQTT", "Started");
|
||||
|
||||
client.setCallback(__callback);
|
||||
client.setBufferSize(1024);
|
||||
haHelper.setDevicePrefix(settings.mqtt.prefix);
|
||||
haHelper.setDeviceVersion(PROJECT_VERSION);
|
||||
haHelper.setDeviceModel(PROJECT_NAME);
|
||||
@@ -138,6 +139,13 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
if (!doc["heating"]["maxModulation"].isNull() && doc["heating"]["maxModulation"].is<unsigned char>()) {
|
||||
if (doc["heating"]["maxModulation"].as<unsigned char>() > 0 && doc["heating"]["maxModulation"].as<unsigned char>() <= 100) {
|
||||
settings.heating.maxModulation = doc["heating"]["maxModulation"].as<unsigned char>();
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!doc["heating"]["maxTemp"].isNull() && doc["heating"]["maxTemp"].is<unsigned char>()) {
|
||||
if (doc["heating"]["maxTemp"].as<unsigned char>() > 0 && doc["heating"]["maxTemp"].as<unsigned char>() <= 100 && doc["heating"]["maxTemp"].as<unsigned char>() > settings.heating.minTemp) {
|
||||
settings.heating.maxTemp = doc["heating"]["maxTemp"].as<unsigned char>();
|
||||
@@ -386,6 +394,7 @@ protected:
|
||||
haHelper.publishSwitchHeatingTurbo();
|
||||
//haHelper.publishNumberHeatingTarget(false);
|
||||
haHelper.publishNumberHeatingHysteresis();
|
||||
haHelper.publishNumberHeatingMaxModulation(false);
|
||||
haHelper.publishSensorHeatingSetpoint(false);
|
||||
haHelper.publishSensorCurrentHeatingMinTemp(false);
|
||||
haHelper.publishSensorCurrentHeatingMaxTemp(false);
|
||||
@@ -542,6 +551,7 @@ protected:
|
||||
doc["heating"]["turbo"] = settings.heating.turbo;
|
||||
doc["heating"]["target"] = settings.heating.target;
|
||||
doc["heating"]["hysteresis"] = settings.heating.hysteresis;
|
||||
doc["heating"]["maxModulation"] = settings.heating.maxModulation;
|
||||
doc["heating"]["minTemp"] = settings.heating.minTemp;
|
||||
doc["heating"]["maxTemp"] = settings.heating.maxTemp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user