This commit is contained in:
Mateusz Gruszczyński committed 2026-09-01 11:10:28 +02:00
1 parent 3479ed750d
commit 9f08d7ccf9
30 files changed
+559 -150

No files matched your search

+9
View File
@@ -167,6 +167,15 @@ mod tests {
assert!(!command_field_matches_device(&command, "target_temperature", &device));
}
#[test]
fn conflicting_thermostat_output_fields_are_detected_for_direct_automation() {
assert!(!automation_action_conflicts_with_thermostat(&DeviceCommand { power: Some(true), ..Default::default() }));
assert!(!automation_action_conflicts_with_thermostat(&DeviceCommand { target_temperature: Some(22.0), ..Default::default() }));
assert!(automation_action_conflicts_with_thermostat(&DeviceCommand { fan_speed: Some(3), ..Default::default() }));
assert!(automation_action_conflicts_with_thermostat(&DeviceCommand { quiet: Some(true), ..Default::default() }));
assert!(!automation_action_conflicts_with_thermostat(&DeviceCommand { light: Some(false), turbo: Some(true), ..Default::default() }));
}
#[test]
fn local_thermostat_ownership_blocks_direct_automation() {
let mut zone = test_zone("device");