v0.5.5
This commit is contained in:
+11
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user