Skip to content

Commit 36ce3c1

Browse files
committed
Optimize - replace if-construct
1 parent 0d5e5c7 commit 36ce3c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugwise/helper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,9 @@ def all_appliances(self):
434434
)
435435
fl_state = self._appliances.find(".//logs/point_log[type='flame_state']")
436436
bl_state = self._appliances.find(".//services/boiler_state")
437-
if self._cp_state or fl_state or bl_state:
438-
self.active_device_present = True
437+
self.active_device_present = (
438+
self._cp_state is not None or fl_state is not None or bl_state is not None
439+
)
439440

440441
for appliance in self._appliances:
441442
appl = Munch()

0 commit comments

Comments
 (0)