From 6a7ff7a22e4f04dceeee819251f2bd1d122ec5b2 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 11 Jan 2021 00:07:44 +0100 Subject: [PATCH] Add hallway automation --- automations/files/hallway-motion.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 automations/files/hallway-motion.yaml diff --git a/automations/files/hallway-motion.yaml b/automations/files/hallway-motion.yaml new file mode 100644 index 0000000..59c4829 --- /dev/null +++ b/automations/files/hallway-motion.yaml @@ -0,0 +1,23 @@ +- id: hallway-motion-on + alias: '[Hallway] Motion On' + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.hallway_motion_sensor + from: 'off' + to: 'on' + action: + - service: light.turn_on + entity_id: light.hallway_lightstrip +- id: hallway-motion-off + alias: '[Hallway] Motion Off' + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.hallway_motion_sensor + for: '0:02:00' + from: 'on' + to: 'off' + action: + - service: light.turn_off + entity_id: light.hallway_lightstrip