This commit is contained in:
Mateusz Gruszczyński
2026-08-24 16:47:23 +02:00
parent 66a5d6e5e9
commit 4ab878d587
15 changed files with 284 additions and 101 deletions
+11 -2
View File
@@ -354,8 +354,6 @@ async fn control_zones(state: &AppState) -> Result<()> {
let night_active = night_mode_active(&settings.night_mode, Local::now().time());
for mut zone in state.db.list_zones()? {
if !zone.enabled { continue; }
if zone.manual_override_until.map(|until| until <= Utc::now()).unwrap_or(false) {
zone.manual_preset = None;
zone.manual_setpoint = None;
@@ -419,6 +417,17 @@ async fn control_zones(state: &AppState) -> Result<()> {
}));
}
// Disabled zones still refresh and publish their room temperature. Disabling a
// thermostat stops control actions, but it must not make the room sensor disappear
// from the dashboard or zone view.
if !zone.enabled {
zone.demand = false;
record_zone_history(state, &zone, outdoor_temperature, settings.poll_interval_seconds);
state.db.save_zone(&zone)?;
state.broadcast("zone.updated", serde_json::to_value(&zone)?);
continue;
}
// Global Off is the only normal path that intentionally powers units down.
if effective_mode == "off" {
zone.active_preset = "off".into();