From fdcf0ff92b466a335f045316795406a2065a6bc7 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Mon, 5 Jul 2021 22:55:26 +0200 Subject: [PATCH] Add automation for lock button --- .../automations/hallway-lock-button.yaml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 configuration/automations/hallway-lock-button.yaml diff --git a/configuration/automations/hallway-lock-button.yaml b/configuration/automations/hallway-lock-button.yaml new file mode 100644 index 0000000..3a4f44c --- /dev/null +++ b/configuration/automations/hallway-lock-button.yaml @@ -0,0 +1,31 @@ +- id: hallway-front-door-button-lock + alias: '[Front Door] Button Lock' + trigger: + - device_id: d30d25752f5e6741eb8d9562f5b44897 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_off + action: + - service: lock.lock + target: + entity_id: lock.front_door_25f246fe_door_lock + +- id: hallway-front-door-button-unlock + alias: '[Front Door] Button Unlock' + trigger: + - device_id: d30d25752f5e6741eb8d9562f5b44897 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_on + condition: + - condition: not + conditions: + - condition: state + entity_id: input_select.home_mode + state: Away + action: + - service: lock.unlock + target: + entity_id: lock.front_door_25f246fe_door_lock