File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -792,9 +792,12 @@ def _cleanup_data(self, data: GwEntityData) -> None:
792792 def _scan_thermostats (self ) -> None :
793793 """Helper-function for smile.py: get_all_entities().
794794
795- Update locations with thermostat ranking results and use
795+ Adam only: update locations with thermostat ranking results and use
796796 the result to update the device_class of secondary thermostats.
797797 """
798+ if not self .check_name (ADAM ):
799+ return
800+
798801 self ._match_and_rank_thermostats ()
799802 for location_id , location in self ._loc_data .items ():
800803 if location ["primary_prio" ] != 0 :
@@ -850,7 +853,11 @@ def _rank_thermostat(
850853 There can be several primary and secondary thermostats per location.
851854 """
852855 appl_class = entity ["dev_class" ]
853- if location_id == entity ["location" ] and appl_class in thermo_matching :
856+ if (
857+ "location" in entity
858+ and location_id == entity ["location" ]
859+ and appl_class in thermo_matching
860+ ):
854861 # Pre-elect new primary
855862 if thermo_matching [appl_class ] == location ["primary_prio" ]:
856863 location ["primary" ].append (entity_id )
Original file line number Diff line number Diff line change @@ -114,9 +114,9 @@ def get_all_gateway_entities(self) -> None:
114114 if self ._is_thermostat :
115115 self .therms_with_offset_func = (
116116 self ._get_appliances_with_offset_functionality ()
117- )
118- if self . check_name ( ADAM ):
119- self ._scan_thermostats ()
117+ )
118+
119+ self ._scan_thermostats ()
120120
121121 self ._get_groups ()
122122
You can’t perform that action at this time.
0 commit comments