1
0

Add Bathroom motion automations

This commit is contained in:
Przemek Grondek 2020-12-29 19:33:16 +01:00
parent 8027112237
commit e5bab23887

View File

@ -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