Skip to content

Commit 4ddc460

Browse files
committed
Clean-up after rebase
1 parent d83cd4a commit 4ddc460

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

plugwise/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,6 @@ class DeviceData(TypedDict, total=False):
488488
"""The Device Data class, covering the collected and ordered output-data per device."""
489489

490490
# Appliance base data
491-
has_actuators: bool
492491
dev_class: str
493492
firmware: str | None
494493
hardware: str

plugwise/helper.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,12 @@ def _all_appliances(self) -> None:
600600
# Legacy P1 has no more devices
601601
return
602602

603-
hc_count = 0
604603
for appliance in self._appliances.findall("./appliance"):
605604
appl = Munch()
606605
appl.pwclass = appliance.find("type").text
607606
# Skip thermostats that have this key, should be an orphaned device (Core #81712)
608607
if (
609-
appl.pwclass in ["heater_central", "thermostat"]
608+
appl.pwclass == "thermostat"
610609
and appliance.find("actuator_functionalities/") is None
611610
):
612611
continue
@@ -657,7 +656,6 @@ def _all_appliances(self) -> None:
657656
for key, value in {
658657
"firmware": appl.firmware,
659658
"hardware": appl.hardware,
660-
"has_actuators": appl.has_actuators,
661659
"location": appl.location,
662660
"mac_address": appl.mac,
663661
"model": appl.model,
@@ -670,22 +668,6 @@ def _all_appliances(self) -> None:
670668
self.gw_devices[appl.dev_id][appl_key] = value
671669
self._count += 1
672670

673-
# Remove thermostat with empty actuator_functionalities (Core #81712), remove heater_central
674-
# with empty actuator_functionalities but only when there are more than one (Core #104433).
675-
for dev_id, device in dict(self.gw_devices).items():
676-
if device["dev_class"] == "thermostat" or (
677-
device["dev_class"] == "heater_central" and hc_count > 1
678-
):
679-
if not self.gw_devices[dev_id]["has_actuators"]:
680-
self._count -= len(self.gw_devices[dev_id])
681-
self.gw_devices.pop(dev_id)
682-
else:
683-
self.gw_devices[dev_id].pop("has_actuators")
684-
self._count -= 1
685-
elif "has_actuators" in self.gw_devices[dev_id]:
686-
self.gw_devices[dev_id].pop("has_actuators")
687-
self._count -= 1
688-
689671
# For non-legacy P1 collect the connected SmartMeter info
690672
if self.smile_type == "power":
691673
self._p1_smartmeter_info_finder(appl)

0 commit comments

Comments
 (0)