lights_turned_on_by.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # - alias: 'who turned on the light, the home assistant or the person?'
  2. # description: ''
  3. # trigger:
  4. # - platform: state
  5. # entity_id: light.inner_living_room_chandelier_light
  6. # condition: []
  7. # action:
  8. # - choose:
  9. # - conditions:
  10. # - condition: template
  11. # value_template: '{{ trigger.to_state.context.user_id == none }}'
  12. # - condition: template
  13. # value_template: '{{ trigger.to_state.context.parent_id == none }}'
  14. # sequence:
  15. # - service: notify.notify
  16. # data:
  17. # message: The light was turned physically
  18. # - conditions:
  19. # - condition: template
  20. # value_template: '{{ trigger.to_state.context.user_id == none }}'
  21. # sequence:
  22. # - service: notify.notify
  23. # data:
  24. # message: The light turned on the Home Assistant
  25. # default: []
  26. # mode: single
  27. blueprint:
  28. domain: automation
  29. name: Lights turned on by
  30. description: >-
  31. Was the light turned on by Home Assistant, or
  32. someone/-thing else?
  33. trigger:
  34. action: