From 186f8beb7868933ec6eaafeaca644db39a2a2933 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/bedroom-motion.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automations/files/bedroom-motion.yaml b/automations/files/bedroom-motion.yaml index 5d0024c..eee9a87 100644 --- a/automations/files/bedroom-motion.yaml +++ b/automations/files/bedroom-motion.yaml @@ -28,6 +28,10 @@ for: '0:02:00' from: 'on' to: 'off' + condition: + - condition: state + entity_id: alarm_control_panel.ha_alarm + state: disarmed action: - service: light.turn_off entity_id: light.bedroom_lights