Skip to content

Commit 548d445

Browse files
committed
Combine if's
1 parent af46088 commit 548d445

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

plugwise/data.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,12 @@ def _get_adam_data(self, entity: GwEntityData, data: GwEntityData) -> None:
232232
if self._on_off_device and isinstance(self._heating_valves(), int):
233233
data["binary_sensors"]["heating_state"] = self._heating_valves() != 0
234234
# Add cooling_enabled binary_sensor
235-
if "binary_sensors" in data:
236-
if (
237-
"cooling_enabled" not in data["binary_sensors"]
238-
and self._cooling_present
239-
):
240-
data["binary_sensors"]["cooling_enabled"] = self._cooling_enabled
235+
if (
236+
"binary_sensors" in data
237+
and "cooling_enabled" not in data["binary_sensors"]
238+
and self._cooling_present
239+
):
240+
data["binary_sensors"]["cooling_enabled"] = self._cooling_enabled
241241

242242
# Show the allowed regulation_modes and gateway_modes
243243
if entity["dev_class"] == "gateway":

0 commit comments

Comments
 (0)