feat:hallway motion automation
This commit is contained in:
40
packages/light/motion.yaml
Executable file
40
packages/light/motion.yaml
Executable file
@ -0,0 +1,40 @@
|
||||
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
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: sun
|
||||
before: sunrise
|
||||
- condition: sun
|
||||
after: sunset
|
||||
action:
|
||||
- type: turn_off
|
||||
device_id: a1865e6541efc7167ba2b21c6e005147
|
||||
entity_id: light.hallway_switch_lamp
|
||||
domain: light
|
Reference in New Issue
Block a user