mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
alias: Mancave Lights
|
|
id: automation_mancave_lights
|
|
mode: queued
|
|
|
|
triggers:
|
|
- trigger: state
|
|
id: door_open
|
|
entity_id: binary_sensor.mancave_door_contact
|
|
from: "off"
|
|
to: "on"
|
|
|
|
- trigger: state
|
|
id: door_closed
|
|
entity_id: binary_sensor.mancave_door_contact
|
|
from: "on"
|
|
to: "off"
|
|
for: "00:10:00"
|
|
|
|
- trigger: state
|
|
id: motion_off
|
|
entity_id: binary_sensor.mancave_motion_switch_home_security_motion_detection
|
|
to: "off"
|
|
for: "00:15:00"
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: "door_open"
|
|
- condition: state
|
|
entity_id: light.mancave
|
|
state: 'off'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.mancave
|
|
- conditions:
|
|
- condition: trigger
|
|
id: "door_closed"
|
|
- condition: state
|
|
entity_id: binary_sensor.mancave_motion_switch_home_security_motion_detection
|
|
state: "off"
|
|
- condition: state
|
|
entity_id: light.mancave
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.mancave |