File tree Expand file tree Collapse file tree 2 files changed +2
-15
lines changed
Expand file tree Collapse file tree 2 files changed +2
-15
lines changed Original file line number Diff line number Diff line change 8686MODULE_LOCATOR : Final = "./logs/point_log/*[@id]"
8787NONE : Final = "None"
8888OFF : Final = "off"
89- PRIORITY_DEVICE_CLASSES = ("heater_central " , "gateway " )
89+ PRIORITY_DEVICE_CLASSES = ("gateway " , "heater_central " )
9090
9191# XML data paths
9292APPLIANCES : Final = "/core/appliances"
Original file line number Diff line number Diff line change 2828 NONE ,
2929 OFF ,
3030 P1_MEASUREMENTS ,
31- PRIORITY_DEVICE_CLASSES ,
3231 TEMP_CELSIUS ,
3332 THERMOSTAT_CLASSES ,
3433 TOGGLES ,
@@ -160,7 +159,7 @@ def _all_appliances(self) -> None:
160159 self ._get_p1_smartmeter_info ()
161160
162161 # Sort the gw_entities
163- self ._sort_gw_entities ()
162+ self ._reorder_devices ()
164163
165164 def _get_p1_smartmeter_info (self ) -> None :
166165 """For P1 collect the connected SmartMeter info from the Home/building location.
@@ -193,18 +192,6 @@ def _get_p1_smartmeter_info(self) -> None:
193192
194193 self ._create_gw_entities (appl )
195194
196- def _sort_gw_entities (self ) -> None :
197- """Place the gateway and optional heater_central entities as 1st and 2nd."""
198- for dev_class in PRIORITY_DEVICE_CLASSES :
199- for entity_id , entity in dict (self .gw_entities ).items ():
200- if entity ["dev_class" ] == dev_class :
201- priority_entity = entity
202- self .gw_entities .pop (entity_id )
203- other_entities = self .gw_entities
204- priority_entities = {entity_id : priority_entity }
205- self .gw_entities = {** priority_entities , ** other_entities }
206- break
207-
208195 def _all_locations (self ) -> None :
209196 """Collect all locations."""
210197 loc = Munch ()
You can’t perform that action at this time.
0 commit comments