We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa40c50 commit 5a9e17bCopy full SHA for 5a9e17b
plugwise/helper.py
@@ -359,11 +359,11 @@ def _sort_gw_entities(self) -> None:
359
for dev_class in ("heater_central", "gateway"):
360
for entity_id, entity in dict(self.gw_entities).items():
361
if entity["dev_class"] == dev_class:
362
- tmp_entity = entity
+ priority_entity = entity
363
self.gw_entities.pop(entity_id)
364
- cleared_dict = self.gw_entities
365
- add_to_front = {entity_id: tmp_entity}
366
- self.gw_entities = {**add_to_front, **cleared_dict}
+ other_entities = self.gw_entities
+ priority_entities = {entity_id: priority_entity}
+ self.gw_entities = {**priority_entities, **other_entities}
367
368
def _all_locations(self) -> None:
369
"""Collect all locations."""
0 commit comments