v0.8.16
This commit is contained in:
+11
-2
@@ -588,13 +588,22 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn external_room_sensor_selects_lower_cooling_setpoint_only_when_used() {
|
||||
assert_eq!(external_room_sensor_cooling_assist("cool", "external"), 0.5);
|
||||
assert_eq!(external_room_sensor_cooling_assist("cool", "combined"), 0.5);
|
||||
assert_eq!(external_room_sensor_cooling_assist("cool", "external"), 1.0);
|
||||
assert_eq!(external_room_sensor_cooling_assist("cool", "combined"), 1.0);
|
||||
assert_eq!(external_room_sensor_cooling_assist("cool", "device_fallback"), 0.0);
|
||||
assert_eq!(external_room_sensor_cooling_assist("cool", "device_discrepancy_fallback"), 0.0);
|
||||
assert_eq!(external_room_sensor_cooling_assist("heat", "external"), 0.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn external_room_sensor_cooling_keeps_full_step_below_half_degree_target() {
|
||||
let assist = external_room_sensor_cooling_assist("cool", "external");
|
||||
assert_eq!(round_device_setpoint("cool", true, 23.0 - assist), 22.0);
|
||||
assert_eq!(round_device_setpoint("cool", true, 23.5 - assist), 22.0);
|
||||
assert_eq!(round_device_setpoint("cool", true, 24.0 - assist), 23.0);
|
||||
assert_eq!(round_device_setpoint("cool", true, 24.5 - assist), 23.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn smart_fan_uses_low_speed_when_zone_is_satisfied() {
|
||||
assert_eq!(smart_fan_speed("heat", 21.0, 21.0, None, false), 1);
|
||||
|
||||
Reference in New Issue
Block a user