Skip to content

Commit e8f0b60

Browse files
committed
Correct item_count
1 parent 92a4a76 commit e8f0b60

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugwise/helper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@ def _control_state(self, data: GwEntityData) -> str | bool:
800800

801801
if (ctrl_state := data["thermostat"].get("control_state")) is not None:
802802
data["thermostat"].pop("control_state")
803+
self._count -= 1
803804
return ctrl_state
804805

805806
# Handle missing control_state in regulation_mode off for firmware >= 3.2.0 (issue #776)
@@ -843,6 +844,7 @@ def _regulation_control(self, data: GwEntityData) -> None:
843844
data["select_regulation_control"] = reg_control
844845
data["regulation_control_modes"] = ["active", "passive", "off"]
845846
data["thermostat"].pop("regulation_control")
847+
self._count += 1
846848

847849
def _preset(self, loc_id: str) -> str | None:
848850
"""Helper-function for smile.py: device_data_climate().

0 commit comments

Comments
 (0)