From 82ea8d0cecf16dd90fd510fbe6510678c2f4e6ad Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Tue, 29 Nov 2022 00:58:23 +0100 Subject: [PATCH] Fix look with locking door --- scripts/10.modes.yaml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index 2e82205..8ec7282 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -42,9 +42,17 @@ good_night: - cover.bedroom_blinds - cover.dining_blinds - cover.office_blinds - - service: lock.lock - target: - entity_id: lock.front_door_lock_doorlock + - choose: + - conditions: + - condition: state + entity_id: lock.front_door_lock_doorlock + state: unlocked + sequence: + - service: lock.lock + data: { } + target: + entity_id: lock.front_door_lock_doorlock + - choose: - conditions: - condition: numeric_state @@ -156,9 +164,16 @@ leave_home: entity_id: - switch.printer_switch - service: script.pc_sleep - - service: lock.lock - target: - entity_id: lock.front_door_lock_doorlock + - choose: + - conditions: + - condition: state + entity_id: lock.front_door_lock_doorlock + state: unlocked + sequence: + - service: lock.lock + data: { } + target: + entity_id: lock.front_door_lock_doorlock - service: script.tv_off - service: climate.turn_off target: