1
0
ansible-home-assistant/configuration/automations/bathroom-shower-motion.yaml
2021-05-25 00:13:16 +02:00

24 lines
572 B
YAML

- id: bathroom-shower-motion-on
alias: '[Bathroom] Shower Motion On'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.shower_motion
from: 'off'
to: 'on'
action:
- service: light.turn_on
entity_id: light.shower_lights
- id: bathroom-shower-motion-off
alias: '[Bathroom] Shower Motion Off'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.shower_motion
for: '0:01:00'
from: 'on'
to: 'off'
action:
- service: light.turn_off
entity_id: light.shower_lights