Skip to content

Commit b4f52ce

Browse files
committed
Don't show cooling-state when no cooling present
1 parent 9ce705f commit b4f52ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plugwise/smile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ def get_all_devices(self) -> None:
105105
# Collect data for each device via helper function
106106
self._all_device_data()
107107

108+
# Don't show cooling_state when no cooling present
109+
for _, device in self.gw_devices.items():
110+
if (
111+
not self._cooling_present
112+
and "binary_sensors" in device
113+
and "cooling_state" in device["binary_sensors"]
114+
):
115+
device["binary_sensors"].pop("cooling_state")
116+
108117
def _device_data_switching_group(
109118
self, details: dict[str, Any], device_data: dict[str, Any]
110119
) -> dict[str, bool]:

0 commit comments

Comments
 (0)