File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 22
33## Ongoing
44
5+ - Reorder device-dicts: gateway first, optionally heater_central second
56- Improve handling of obsolete sensors (solution for [ HA Core issue #100306 ] ( https://github.com/home-assistant/core/issues/100306 )
67- Improve handling of invalid actuator xml-data (partial solution for [ HA Core issue #99372 ] ( https://github.com/home-assistant/core/issues/99372 )
78
Original file line number Diff line number Diff line change @@ -717,6 +717,16 @@ def _all_appliances(self) -> None:
717717 # Leave for-loop to avoid a 2nd device_id switch
718718 break
719719
720+ # Place the gateway and optional heater_central devices as 1st and 2nd
721+ for dev_class in ("heater_central" , "gateway" ):
722+ for dev_id , device in dict (self .gw_devices ).items ():
723+ if device ["dev_class" ] == dev_class :
724+ tmp_device = device
725+ self .gw_devices .pop (dev_id )
726+ cleared_dict = self .gw_devices
727+ add_to_front = {dev_id : tmp_device }
728+ self .gw_devices = {** add_to_front , ** cleared_dict }
729+
720730 def _match_locations (self ) -> dict [str , ThermoLoc ]:
721731 """Helper-function for _scan_thermostats().
722732
You can’t perform that action at this time.
0 commit comments