Skip to content

Commit aba0122

Browse files
committed
Combine ifs
1 parent b82819d commit aba0122

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

plugwise/__init__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,13 @@ async def async_update(self) -> PlugwiseData:
531531

532532
for device_id, device in self.gw_devices.items():
533533
data = self._get_device_data(device_id)
534-
if "binary_sensors" in device:
535-
if "plugwise_notification" in device["binary_sensors"]:
536-
data["binary_sensors"]["plugwise_notification"] = bool(
537-
self._notifications
538-
)
534+
if (
535+
"binary_sensors" in device
536+
and "plugwise_notification" in device["binary_sensors"]
537+
):
538+
data["binary_sensors"]["plugwise_notification"] = bool(
539+
self._notifications
540+
)
539541

540542
device.update(data)
541543

0 commit comments

Comments
 (0)