This commit is contained in:
Mateusz Gruszczyński committed 2026-09-17 08:52:02 +02:00
1 parent ff4f2b60e7
commit b7846c3b9f
87 files changed
+3783 -1418

No files matched your search

+6 -13
View File
@@ -77,7 +77,8 @@ async fn resolve_cycle_outdoor_temperature(
None
};
let device_groups = state.db.list_device_groups().unwrap_or_default();
let temperature = from_home_assistant.or_else(|| gree_outdoor_temperature(devices, &device_groups));
let temperature =
from_home_assistant.or_else(|| gree_outdoor_temperature(devices, &device_groups));
let mut current = state.outdoor_temperature.write().await;
if *current != temperature {
*current = temperature;
@@ -237,14 +238,9 @@ fn refresh_zone_temperature(
} else {
"ha.sensor_error"
};
let entity_id = resolved_entity
.as_deref()
.or(zone.ha_entity_id.as_deref());
let message = home_assistant_sensor_log_message(
&err,
entity_id,
&zone.name,
);
let entity_id = resolved_entity.as_deref().or(zone.ha_entity_id.as_deref());
let message =
home_assistant_sensor_log_message(&err, entity_id, &zone.name);
state.log(
"warn",
kind,
@@ -1196,10 +1192,7 @@ async fn control_zones(state: &AppState) -> Result<()> {
outdoor_temperature,
settings.poll_interval_seconds,
);
publish_persisted_zone_cycle(
state,
persist_zone_cycle(state, &zone, cycle_started_at)?,
)?;
publish_persisted_zone_cycle(state, persist_zone_cycle(state, &zone, cycle_started_at)?)?;
}
Ok(())