33 lines
977 B
YAML
33 lines
977 B
YAML
|
automation:
|
||
|
- alias: hallway_light_motion_on
|
||
|
trigger:
|
||
|
- device_id: 1cccd1925a81dead19688129d2306f79
|
||
|
entity_id: binary_sensor.hallway_motion_iaszone
|
||
|
domain: binary_sensor
|
||
|
platform: device
|
||
|
type: motion
|
||
|
condition:
|
||
|
condition: or
|
||
|
conditions:
|
||
|
- condition: sun
|
||
|
before: sunrise
|
||
|
- condition: sun
|
||
|
after: sunset
|
||
|
action:
|
||
|
- type: turn_on
|
||
|
device_id: a1865e6541efc7167ba2b21c6e005147
|
||
|
entity_id: light.hallway_switch_lamp
|
||
|
domain: light
|
||
|
|
||
|
- alias: hallway_light_motion_off
|
||
|
trigger:
|
||
|
- device_id: 1cccd1925a81dead19688129d2306f79
|
||
|
entity_id: binary_sensor.hallway_motion_iaszone
|
||
|
domain: binary_sensor
|
||
|
platform: device
|
||
|
type: no_motion
|
||
|
action:
|
||
|
- type: turn_off
|
||
|
device_id: a1865e6541efc7167ba2b21c6e005147
|
||
|
entity_id: light.hallway_switch_lamp
|
||
|
domain: light
|