inner_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: 'inner_living_room_motion_active_lights'
  4. alias: 'Inner living room: Motion active lights'
  5. use_blueprint:
  6. path: motion_detected_lights.yaml
  7. input:
  8. trigger_sensors:
  9. - binary_sensor.inner_living_room_motion_sensor_home_security_motion_detection
  10. #- binary_sensor.test_on_off_bool
  11. synced_lights:
  12. - light.inner_living_room_chandelier_light
  13. #illuminance_sensors:
  14. # - sensor.inner_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_attr('automation.living_room_motion_active_lights', 'current', 0) }}"
  20. wait_actions_before_dim: []
  21. delay: 15