File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 11"""Plugwise module."""
22
3- __version__ = "0.9.4a8 "
3+ __version__ = "0.9.4a9 "
44
55from plugwise .smile import Smile
66from plugwise .stick import stick
Original file line number Diff line number Diff line change @@ -138,7 +138,6 @@ def __init__(self):
138138 self ._locations = None
139139 self ._modules = None
140140
141- self .active_device_present = False
142141 self .appl_data = {}
143142 self .gateway_id = None
144143 self .heater_id = None
@@ -434,8 +433,9 @@ def all_appliances(self):
434433 )
435434 fl_state = self ._appliances .find (".//logs/point_log[type='flame_state']" )
436435 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
436+ self .active_device_present = (
437+ self ._cp_state is not None or fl_state is not None or bl_state is not None
438+ )
439439
440440 for appliance in self ._appliances :
441441 appl = Munch ()
@@ -932,13 +932,11 @@ def schemas(self, loc_id):
932932 return available , selected , schedule_temperature
933933
934934 for rule_id , dummy in rule_ids .items ():
935- active = False
936935 name = self ._domain_objects .find (f'rule[@id="{ rule_id } "]/name' ).text
937- if (
936+ active = (
938937 self ._domain_objects .find (f'rule[@id="{ rule_id } "]/active' ).text
939938 == "true"
940- ):
941- active = True
939+ )
942940 schemas [name ] = active
943941 schedules = {}
944942 locator = f'rule[@id="{ rule_id } "]/directives'
You can’t perform that action at this time.
0 commit comments