Skip to content

Commit 4b47759

Browse files
committed
Reduce complexity of legacy -helper _all_appliances()
1 parent 5bdb3dc commit 4b47759

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugwise/legacy/helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ def _all_appliances(self) -> None:
136136
continue # pragma: no cover
137137

138138
self._create_gw_entities(appl)
139+
self._reorder_devices()
139140

140-
# Place the gateway and optional heater_central devices as 1st and 2nd
141+
def _reorder_devices(self) -> None:
142+
"""Place the gateway and optional heater_central devices as 1st and 2nd."""
141143
for dev_class in PRIORITY_DEVICE_CLASSES:
142144
for entity_id, entity in dict(self.gw_entities).items():
143145
if entity["dev_class"] == dev_class:

0 commit comments

Comments
 (0)