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