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 6a41486 commit 3400aadCopy full SHA for 3400aad
plugwise/helper.py
@@ -801,12 +801,7 @@ def _rank_thermostat(
801
Rank the thermostat based on entity-thermostat-type: primary or secondary.
802
There can be several primary and secondary thermostats per location.
803
"""
804
- appl_class = entity["dev_class"]
805
- if (
806
- "location" in entity
807
- and location_id == entity["location"]
808
- and appl_class in thermo_matching
809
- ):
+ if (appl_class := entity["dev_class"]) in thermo_matching:
810
# Pre-elect new primary
811
if thermo_matching[appl_class] == location["primary_prio"]:
812
location["primary"].append(entity_id)
0 commit comments