From 2854b1056ff8b1524f929fa5bc73900e1ad09666 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 18 Jan 2021 23:28:54 +0100 Subject: [PATCH] Bedroom motion turn off lights only when alarm is disarmed --- automations/files/alarm.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/automations/files/alarm.yaml b/automations/files/alarm.yaml index 6511be2..051e264 100644 --- a/automations/files/alarm.yaml +++ b/automations/files/alarm.yaml @@ -71,6 +71,17 @@ - service: alarm_control_panel.alarm_arm_away entity_id: alarm_control_panel.ha_alarm +- id: alarm-disarm + alias: '[Alarm] Disarm' + trigger: + - platform: zone + entity_id: device_tracker.sm_g965f + zone: zone.home + event: enter + action: + - service: alarm_control_panel.alarm_arm_away + entity_id: alarm_control_panel.ha_alarm + - id: alarm-triggered alias: '[Alarm] Send notification when alarm triggered' trigger: