Skip to content

Commit 98910e1

Browse files
committed
Don't show the cooling-related switch, binary_sensors
when there is no cooling-function present
1 parent ed4acdb commit 98910e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plugwise/helper.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -981,9 +981,11 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
981981
if all(item in data for item in ("cooling_ena_switch", "cooling_enabled")):
982982
data.pop("cooling_enabled")
983983

984-
# Don't show cooling_state when no cooling present
985-
if not self._cooling_present and "cooling_state" in data:
986-
data.pop("cooling_state")
984+
# Don't show cooling-related when no cooling present
985+
if not self._cooling_present:
986+
for item in ("cooling_state", "cooling_ena_switch", "cooling_enabled"):
987+
if item in data:
988+
data.pop(item)
987989

988990
return cast(DeviceData, data)
989991

0 commit comments

Comments
 (0)