From 38f55f54d93642f9e555775437c604e354ee7420 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Tue, 29 Nov 2022 01:03:17 +0100 Subject: [PATCH] Lock door after leaving --- scripts/10.modes.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index 8ec7282..e730e5e 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -170,6 +170,16 @@ leave_home: entity_id: lock.front_door_lock_doorlock state: unlocked sequence: + - choose: + - conditions: + - condition: state + entity_id: binary_sensor.front_door_open_close + state: 'on' + sequence: + - wait_for_trigger: + - platform: state + entity_id: binary_sensor.front_door_open_close + to: 'off' - service: lock.lock data: { } target: