Advertisement
Guest User

frigate ha notif automation ios

a guest
Jul 17th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. alias: "Frigate: Notify on person in porch"
  2. description: ""
  3. triggers:
  4. - topic: frigate/events
  5. id: frigate-event
  6. payload: Driveway-camera
  7. value_template: "{{ value_json['after']['camera'] }}"
  8. variables:
  9. after_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
  10. before_zones: "{{ trigger.payload_json['before']['entered_zones'] }}"
  11. camera: "{{ trigger.payload_json['after']['camera'] }}"
  12. id: "{{ trigger.payload_json['after']['id'] }}"
  13. label: "{{ trigger.payload_json['after']['label'] }}"
  14. score: "{{ trigger.payload_json['after']['score'] }}"
  15. time_clip_start: "{{ trigger.payload_json['after']['start_time'] - 10.0 }}"
  16. trigger: mqtt
  17. conditions:
  18. - condition: template
  19. value_template: "{{ before_zones == ['driveway'] }}"
  20. alias: Is object newly detected and was in the driveway prior before?
  21. enabled: true
  22. - condition: template
  23. value_template: "{{ [\"porch\"] | select(\"in\", after_zones) | list | length > 0 }}"
  24. alias: Has object moved into porch area?
  25. enabled: true
  26. - condition: template
  27. value_template: "{{ trigger.payload_json[\"after\"][\"label\"] == \"person\" }}"
  28. alias: Is object classified as person?
  29. enabled: true
  30. actions:
  31. - choose:
  32. - conditions:
  33. - condition: trigger
  34. id: frigate-event
  35. sequence:
  36. - data:
  37. id: "{{ id }}"
  38. title: Tudor Way
  39. message: >-
  40. Somebody was detected in the {{ after_zones[0] | replace("-", "
  41. ") | lower }}
  42. notifTag: "{{ id }}"
  43. notifIcon: mdi:doorbell-video
  44. group: frigate-notification-{{ camera }}
  45. importance: max
  46. image: >-
  47. https://ha.redacted.com/api/frigate/notifications/{{ id
  48. }}/snapshot.jpg
  49. clickAction: ""
  50. alias: Send notification to phone
  51. action: script.1707650069804
  52. - repeat:
  53. until:
  54. - condition: template
  55. value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}"
  56. alias: Frigate recorded event ended
  57. sequence:
  58. - wait_for_trigger:
  59. - topic: frigate/events
  60. payload: "{{ trigger.payload_json[\"after\"][\"id\"] }}"
  61. value_template: "{{ value_json[\"after\"][\"id\"] }}"
  62. trigger: mqtt
  63. continue_on_timeout: false
  64. timeout: "00:02:00"
  65. - condition: template
  66. value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
  67. - delay: "00:00:04"
  68. - data:
  69. id: "{{ id }}"
  70. title: Tudor Way
  71. message: >-
  72. {% if (wait.trigger.payload_json["after"]["sub_label"] !=
  73. None) -%} {{
  74. (wait.trigger.payload_json["after"]["sub_label"][0]) |
  75. title }} {%- else -%} An unrecognised {{
  76. (wait.trigger.payload_json["after"]["label"]) |
  77. replace("_", " ") | lower }} {%- endif %} was seen in the
  78. {{ after_zones[0] | replace("_", " ") | lower }}
  79. notifTag: "{{ id }}"
  80. notifIcon: mdi:doorbell-video
  81. group: >-
  82. frigate-notification-{{
  83. trigger.payload_json["after"]["camera"] }}
  84. importance: default
  85. image: >-
  86. https://ha.redacted.com/api/frigate/notifications/{{ id
  87. }}/snapshot.jpg
  88. video: >-
  89. https://ha.redacted.com/api/frigate/notifications/{{ id
  90. }}/clip.mp4
  91. clickAction: >-
  92. https://ha.redacted.com/api/frigate/notifications/{{ id
  93. }}/master.m3u8
  94. action: script.1707650069804
  95. default: []
  96. mode: parallel
  97. max: 10
  98. trace:
  99. stored_traces: 25
  100.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement