updating configuration

This commit is contained in:
Your Name
2019-11-17 09:59:10 +03:00
parent cf8737292d
commit 3b5104a10d
22 changed files with 201 additions and 94 deletions
@@ -28,10 +28,13 @@ class IntercomSwitch(hass.Hass):
entity_id = self.args['entity_id']
self.log("Somebody come home, turn on {}".format(entity_id))
self.turn_on(entity_id)
self.notify("Кто-то вернулся домой, включаю домофон.", name = self.args['notify'])
def leave_event(self, event_id, event_args, kwargs):
if 'constraint' in self.args and not self.constrain_input_boolean(self.args['constraint']):
return
entity_id = self.args['entity_id']
self.log("All persons leave home, turn off {}".format(entity_id))
self.turn_off(entity_id)
self.turn_off(entity_id)
self.notify("Все ушли из дома, выключаю домофон", name = self.args['notify'])