feat:hallway motion automation

This commit is contained in:
2022-08-09 19:30:26 +02:00
parent a62d41d3eb
commit ca27869935
3 changed files with 47 additions and 15 deletions

40
packages/light/motion.yaml Executable file
View 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