Add Camera Notifications
This commit is contained in:
@@ -415,7 +415,7 @@ automation:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ trigger.payload_json.after.has_clip }}"
|
value_template: "{{ trigger.payload_json.after.has_clip }}"
|
||||||
action:
|
action:
|
||||||
service: notify.security
|
- service: notify.security
|
||||||
data:
|
data:
|
||||||
message: "A {{ trigger.payload_json.after.label }} detected on {{ trigger.payload_json.after.camera|title }} camera"
|
message: "A {{ trigger.payload_json.after.label }} detected on {{ trigger.payload_json.after.camera|title }} camera"
|
||||||
data:
|
data:
|
||||||
@@ -432,3 +432,17 @@ automation:
|
|||||||
- action: URI
|
- action: URI
|
||||||
title: View Snapshot
|
title: View Snapshot
|
||||||
uri: "https://hass.kraussnet.com/api/frigate/notifications/{{ trigger.payload_json.after.id }}/snapshot.jpg"
|
uri: "https://hass.kraussnet.com/api/frigate/notifications/{{ trigger.payload_json.after.id }}/snapshot.jpg"
|
||||||
|
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: >-
|
||||||
|
{{ trigger.payload_json.after.label == 'Person' }}
|
||||||
|
|
||||||
|
then:
|
||||||
|
- service: persistent_notification.create
|
||||||
|
data:
|
||||||
|
notification_id: "camera-{{ trigger.payload_json.after.id }}"
|
||||||
|
title: "A {{ trigger.payload_json.after.label }} detected on {{ trigger.payload_json.after.camera|title }} camera"
|
||||||
|
message: >-
|
||||||
|

|
||||||
|
[View Clip](/api/frigate/notifications/{{ trigger.payload_json.after.id }}/clip.mp4)
|
||||||
|
|||||||
Reference in New Issue
Block a user