hall_lights.yaml 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. automation:
  2. - id: hall_light_react
  3. alias: "Entrance - Hall: Turn on ceiling lights"
  4. trigger:
  5. platform: event
  6. event_type: zwave_js_value_notification
  7. event_data:
  8. domain: zwave_js
  9. node_id: 226
  10. action:
  11. service: system_log.write
  12. data:
  13. message: "This is it! Here's trigger {{ trigger.event.data }} {{ area_entities(device_attr(trigger.event.data.device_id, 'area_id'))|selectattr('domain','in','light')|list }}"
  14. level: warning
  15. # service: "light.{{ 'turn_off' if trigger.event.data.value_raw else 'turn_on' }}"
  16. # entity_id: >-
  17. # {{ area_entities(device_attr(trigger.event.data.device_id, 'area_id'))|expand|selectattr('domain', 'eq', 'light')|list }}
  18. - id: 'entrance_hall_motion_active_lights'
  19. alias: 'Entrance - Hall: Motion active lights'
  20. use_blueprint:
  21. path: motion_detected_lights.yaml
  22. input:
  23. trigger_sensors:
  24. - binary_sensor.entrance_motion_sensor_home_security_motion_detection
  25. - binary_sensor.entrance_door_sensor_access_control_window_door_is_open
  26. synced_lights:
  27. - light.entrance_ceiling_lights
  28. after_wait_actions:
  29. - wait_template: "{{ is_state('input_boolean.housekeeping_mode', 'off') }}"
  30. wait_actions_before_dim: []
  31. delay: 1