File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -812,6 +812,10 @@ def _scan_thermostats(self) -> None:
812812 for dev_id , device in self .gw_devices .items ():
813813 self ._rank_thermostat (thermo_matching , loc_id , dev_id , device )
814814
815+ for loc_id , loc_data in list (self ._thermo_locs .items ()):
816+ if loc_data ["primary_prio" ] == 0 :
817+ self ._thermo_locs .pop (loc_id )
818+
815819 LOGGER .debug ("HOI 2 thermo_locs: %s" , self ._thermo_locs )
816820 # Update secondary thermostat class where needed
817821 for dev_id , device in self .gw_devices .items ():
@@ -868,8 +872,6 @@ def _rank_thermostat(
868872 self ._thermo_locs [loc_id ]["primary" ].add (appliance_id )
869873 else :
870874 self ._thermo_locs [loc_id ]["secondary" ].add (appliance_id )
871- else :
872- self ._thermo_locs .pop (loc_id )
873875
874876 def _control_state (self , loc_id : str ) -> str | bool :
875877 """Helper-function for _device_data_adam().
You can’t perform that action at this time.
0 commit comments