Add Bathroom motion automations
This commit is contained in:
parent
8027112237
commit
e5bab23887
31
automations/files/bathroom-motion.yaml
Normal file
31
automations/files/bathroom-motion.yaml
Normal 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
|
Loading…
Reference in New Issue
Block a user