From eaae7d0d6f82f9b7f1fa0394c3a1e8a54c51c371 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Fri, 28 May 2021 00:22:58 +0200 Subject: [PATCH] Add door lock to scripts and automations --- configuration/automations/alarm.yaml | 4 ++++ scripts/10.modes.yaml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/configuration/automations/alarm.yaml b/configuration/automations/alarm.yaml index c0a2f8b..62d6351 100644 --- a/configuration/automations/alarm.yaml +++ b/configuration/automations/alarm.yaml @@ -39,6 +39,10 @@ - platform: state entity_id: binary_sensor.living_room_window_open_close to: 'on' +# Use lock + - platform: state + entity_id: lock.front_door_25f246fe_door_lock + to: 'unlocked' condition: - condition: state entity_id: alarm_control_panel.ha_alarm diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index 68a3f63..d194b1c 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -41,6 +41,9 @@ good_night: - service: cover.close_cover target: entity_id: cover.bedroom_blind + - service: lock.lock + target: + entity_id: lock.front_door_25f246fe_door_lock mode: single icon: mdi:weather-night good_morning: @@ -95,6 +98,9 @@ leave_home: - service: switch.turn_off entity_id: switch.desk_motor_on_off - service: script.pc_sleep + - service: lock.lock + target: + entity_id: lock.front_door_25f246fe_door_lock mode: single icon: mdi:home-export-outline arrive_home: