Skip to content

Commit 57a44eb

Browse files
committed
Improve
1 parent 2538f0e commit 57a44eb

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

plugwise/helper.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -644,14 +644,9 @@ def _all_appliances(self) -> None:
644644
# Remove thermostat with empty actuator_functionalities (Core #81712), remove heater_central
645645
# with empty actuator_functionalities but only when there are more than one (Core #104433).
646646
for dev_id, device in dict(self.gw_devices).items():
647-
if device["dev_class"] == "thermostat":
648-
if not self.gw_devices[dev_id]["has_actuators"]:
649-
self._count -= len(self.gw_devices[dev_id])
650-
self.gw_devices.pop(dev_id)
651-
else:
652-
self.gw_devices[dev_id].pop("has_actuators")
653-
self._count -= 1
654-
elif device["dev_class"] == "heater_central" and hc_count > 1:
647+
if device["dev_class"] == "thermostat" or (
648+
device["dev_class"] == "heater_central" and hc_count > 1
649+
):
655650
if not self.gw_devices[dev_id]["has_actuators"]:
656651
self._count -= len(self.gw_devices[dev_id])
657652
self.gw_devices.pop(dev_id)

0 commit comments

Comments
 (0)