Skip to content

Commit

Permalink
Drop orphaned heater_central
Browse files Browse the repository at this point in the history
  • Loading branch information
bouwew committed Nov 30, 2023
1 parent de10859 commit ae6041b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugwise/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,12 +603,16 @@ def _all_appliances(self) -> None:
for appliance in self._appliances.findall("./appliance"):
appl = Munch()
appl.pwclass = appliance.find("type").text
appl.dev_id = appliance.attrib["id"]
# Skip thermostats that have this key, should be an orphaned device (Core #81712)
if (
appl.pwclass == "thermostat"
and appliance.find("actuator_functionalities/") is None
):
continue
# Skip orphaned heater_central (Core Issue #104433)
if appl.pwclass == "heater_central" and appl.dev_id != self._heater_id:
continue

appl.location = None
if (appl_loc := appliance.find("location")) is not None:
Expand All @@ -620,7 +624,6 @@ def _all_appliances(self) -> None:
) or appl.pwclass not in THERMOSTAT_CLASSES:
appl.location = self._home_location

appl.dev_id = appliance.attrib["id"]
appl.name = appliance.find("name").text
appl.model = appl.pwclass.replace("_", " ").title()
appl.firmware = None
Expand Down

0 comments on commit ae6041b

Please sign in to comment.