Skip to content

Commit e04b222

Browse files
committed
Add guarding
1 parent 5a8aade commit e04b222

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugwise/smile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ def update_for_cooling(self, devices: dict[str, DeviceData]) -> None:
8383
"setpoint_low": min_setpoint,
8484
"setpoint_high": thermostat["setpoint"],
8585
}
86-
sensors.pop("setpoint")
87-
sensors.update(temp_dict)
86+
if "setpoint_low" not in sensors:
87+
sensors.pop("setpoint")
88+
sensors.update(temp_dict)
8889
thermostat.pop("setpoint")
8990
temp_dict.update(thermostat)
9091
device["thermostat"] = temp_dict

0 commit comments

Comments
 (0)