Skip to content

Commit f0410a0

Browse files
committed
Optimize
1 parent 3a47928 commit f0410a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugwise/helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,9 +866,10 @@ def _rank_thermostat(
866866
# Crown primary
867867
self._thermo_locs[loc_id]["primary_prio"] = thermo_matching[appl_class]
868868
self._thermo_locs[loc_id]["primary"].add(appliance_id)
869-
870869
else:
871870
self._thermo_locs[loc_id]["secondary"].add(appliance_id)
871+
else:
872+
self._thermo_locs.pop(loc_id)
872873

873874
def _control_state(self, loc_id: str) -> str | bool:
874875
"""Helper-function for _device_data_adam().

0 commit comments

Comments
 (0)