v0.14.10
This commit is contained in:
1 parent
0437ef7b6f
commit
0d73844f23
17 files changed
+147
-54
No files matched your search
@@ -19,6 +19,29 @@ mod tests {
|
||||
assert_eq!(effective_sensor_stale_after_seconds(120_000, 600), 86_400);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ha_sensor_log_message_identifies_sensor_and_zone() {
|
||||
let message = home_assistant_sensor_log_message(
|
||||
"Home Assistant sensor is stale: 3607s old (limit 3600s)",
|
||||
Some("sensor.igor_temperature"),
|
||||
"Igor",
|
||||
);
|
||||
assert_eq!(
|
||||
message,
|
||||
"Home Assistant sensor sensor.igor_temperature, zone Igor is stale: 3607s old (limit 3600s)"
|
||||
);
|
||||
|
||||
let message = home_assistant_sensor_log_message(
|
||||
"Home Assistant state is not a number",
|
||||
Some("sensor.jan_temperature"),
|
||||
"Jan",
|
||||
);
|
||||
assert_eq!(
|
||||
message,
|
||||
"Home Assistant state is not a number [sensor: sensor.jan_temperature, zone Jan]"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn control_plan_semantic_equality_ignores_only_generation_timestamp() {
|
||||
let generated_at = Utc.with_ymd_and_hms(2026, 9, 4, 8, 0, 0).unwrap();
|
||||
|
||||
Reference in new issue
Block a user