123456789101112131415161718192021 |
- # Require: https://github.com/jmgiaever/home-assistant-blueprints/blob/master/automation/motion_detected_lights.yaml
- automation:
- - id: 'living_room_motion_active_lights'
- alias: 'Living room: Motion active lights'
- use_blueprint:
- path: motion_detected_lights.yaml
- input:
- trigger_sensors:
- - binary_sensor.living_room_motion_sensor_home_security_motion_detection
- synced_lights:
- - light.living_room_chandelier_light
- - light.living_room_piano_light
- illuminance_sensors:
- - sensor.living_room_motion_sensor_illuminance
- illuminance_threshold: 10
- after_wait_actions:
- - wait_template: "{{ is_state('input_boolean.housekeeping_mode', 'off') }}"
- # Our living rooms are «open» between. Wait until motion in both are off to turn off the lights
- - wait_template: "{{ is_state('binary_sensor.inner_living_room_motion_sensor_home_security_motion_detection', 'off') }}"
- wait_actions_before_dim: false
- delay: 15
|