1
0
ansible-home-assistant/configuration/automations/bathroom-shower-motion.yaml

32 lines
790 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: script.bathroom_shower_lights_on
- id: bathroom-shower-motion-off
alias: '[Bathroom] Shower Motion Off'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.shower_motion
for: '0:02:00'
from: 'on'
to: 'off'
- platform: state
entity_id: binary_sensor.bathroom_motion_occupancy
for: '0:05:00'
from: 'on'
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.shower_motion
for: '0:02:00'
state: 'off'
action:
- service: script.bathroom_shower_lights_off