diff --git a/automations/files/bathroom-motion.yaml b/automations/files/bathroom-motion.yaml new file mode 100644 index 0000000..0929dfa --- /dev/null +++ b/automations/files/bathroom-motion.yaml @@ -0,0 +1,31 @@ +- id: bathroom-motion-on + alias: Bathroom Motion On + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.bathroom_motion_sensor + from: 'off' + to: 'on' + action: + - service: light.turn_on + entity_id: + - light.bathroom_1 + - light.bathroom_2 + - light.bathroom_3 + - light.bathroom_4 +- id: bathroom-motion-off + alias: Bathroom Motion Off + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.bathroom_motion_sensor + for: '0:01:00' + from: 'on' + to: 'off' + action: + - service: light.turn_off + entity_id: + - light.bathroom_1 + - light.bathroom_2 + - light.bathroom_3 + - light.bathroom_4