updating configuration
This commit is contained in:
@@ -34,9 +34,6 @@ class LightControlHall(hass.Hass):
|
||||
for sensor in self.args['motion_sensors']:
|
||||
self.listen_event_handle_list.append(self.listen_state(self.motion_trigger, sensor))
|
||||
|
||||
for event in self.args['events']:
|
||||
self.listen_event(self.event_trigger, event)
|
||||
|
||||
|
||||
def motion_trigger(self, entity, attribute, old, new, kwargs):
|
||||
#sensor is off
|
||||
@@ -59,15 +56,6 @@ class LightControlHall(hass.Hass):
|
||||
self.turn_on_by_door = True
|
||||
self.stop_timer()
|
||||
|
||||
def event_trigger(self, event_name, data, kwargs):
|
||||
if 'constraint' in self.args and not self.constrain_input_boolean(self.args['constraint']):
|
||||
return
|
||||
#turnin on control entity and wait while sensor will be off, than run timer.
|
||||
self.control_entity_on()
|
||||
self.turn_on_by_door = True
|
||||
self.stop_timer()
|
||||
self.run_timer()
|
||||
|
||||
def terminate(self):
|
||||
if self.listen_event_handle_list != None:
|
||||
for listen_event_handle in self.listen_event_handle_list:
|
||||
|
||||
Reference in New Issue
Block a user