living_room_lights.yaml 1.0 KB

123456789101112131415161718192021
  1. # Require: https://github.com/jmgiaever/home-assistant-blueprints/blob/master/automation/motion_detected_lights.yaml
  2. automation:
  3. - id: 'living_room_motion_active_lights'
  4. alias: 'Living room: Motion active lights'
  5. use_blueprint:
  6. path: motion_detected_lights.yaml
  7. input:
  8. trigger_sensors:
  9. - binary_sensor.living_room_motion_sensor_home_security_motion_detection
  10. synced_lights:
  11. - light.living_room_chandelier_light
  12. - light.living_room_piano_light
  13. illuminance_sensors:
  14. - sensor.living_room_motion_sensor_illuminance
  15. illuminance_threshold: 10
  16. after_wait_actions:
  17. - wait_template: "{{ is_state('input_boolean.housekeeping_mode', 'off') }}"
  18. # Our living rooms are «open» between. Wait until motion in both are off to turn off the lights
  19. - wait_template: "{{ is_state('binary_sensor.inner_living_room_motion_sensor_home_security_motion_detection', 'off') }}"
  20. wait_actions_before_dim: false
  21. delay: 15