feat: expose smart heating control across device interfaces

Rename indoor_temp_control to smart_control across firmware, REST,
the dashboard and Home Assistant.

Publish state/master/heating/smart_control over MQTT and remove the
redundant state/master/mqtt/connected topic.
This commit is contained in:
Yurii authored and Yurii committed 2026-11-23 19:25:37 +03:00
1 parent 31fe7268ac
commit 0b07e88812
7 files changed
+16 -16

No files matched your search

+5 -5
View File
@@ -1336,11 +1336,11 @@ static bool normalizeHeatingFreezeBounds(HeatingSettings& dst) {
static SettingResult setHeatingTarget(HeatingSettings& dst, float value) {
bool changed = false;
bool indoorTempControl = settings.equitherm.enabled || settings.pid.enabled || settings.opentherm.options.nativeOTC;
float minTemp = indoorTempControl
bool smartControl = settings.equitherm.enabled || settings.pid.enabled || settings.opentherm.options.nativeOTC;
float minTemp = smartControl
? THERMOSTAT_INDOOR_MIN_TEMP
: dst.minTemp;
float maxTemp = indoorTempControl
float maxTemp = smartControl
? THERMOSTAT_INDOOR_MAX_TEMP
: dst.maxTemp;
@@ -1353,7 +1353,7 @@ static SettingResult setHeatingTarget(HeatingSettings& dst, float value) {
);
if (!valid) {
value = indoorTempControl ? THERMOSTAT_INDOOR_DEFAULT_TEMP : DEFAULT_HEATING_TARGET_TEMP;
value = smartControl ? THERMOSTAT_INDOOR_DEFAULT_TEMP : DEFAULT_HEATING_TARGET_TEMP;
}
value = constrain(value, minTemp, maxTemp);
@@ -3405,7 +3405,7 @@ JsonVariant toJson(const Variables& src, JsonVariant dst) {
auto mHeating = master[S_HEATING].to<JsonObject>();
mHeating[S_ENABLED] = src.master.heating.enabled;
mHeating[S_BLOCKING] = src.master.heating.blocking;
mHeating[S_INDOOR_TEMP_CONTROL] = src.master.heating.indoorTempControl;
mHeating[S_SMART_CONTROL] = src.master.heating.smartControl;
mHeating[S_OVERHEAT] = src.master.heating.overheat;
mHeating[S_FREEZING] = src.master.heating.freezing;
mHeating[S_SETPOINT_TEMP] = roundf((src.master.heating.setpointTemp == 0 ? 0 : convertTemp(src.master.heating.setpointTemp, UnitSystem::METRIC, settings.system.unitSystem)), 2);