From 0dc81117aad89efa74fd915051576a9ace53a39d Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 16 Jan 2021 11:38:19 -0600 Subject: [PATCH] docs updates for notification changes --- README.md | 6 +++--- docs/notification-examples.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 44c2bbc35..bf2159c8d 100644 --- a/README.md +++ b/README.md @@ -790,7 +790,7 @@ automation: data_template: message: 'A {{trigger.payload_json["after"]["label"]}} was detected.' data: - image: 'https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}.jpg?format=android' + image: 'https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android' tag: '{{trigger.payload_json["after"]["id"]}}' ``` Note that the image url has `?format=android`. This adjusts the aspect ratio to be idea for android notifications. For iOS optimized snapshots, no format parameter needs to be passed. @@ -941,8 +941,8 @@ Returns summary data for events in the database. Used by the HomeAssistant integ ### `/api/events/` Returns data for a single event. -### `/api/events//snapshot.jpg` -Returns a snapshot for the event id optimized for notifications. Works while the event is in progress and after completion. Passing `?format=android` will convert the thumbnail to 2:1 aspect ratio. +### `/api/events//thumbnail.jpg` +Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing `?format=android` will convert the thumbnail to 2:1 aspect ratio. ### `/clips/-.mp4` Video clip for the given camera and event id. diff --git a/docs/notification-examples.md b/docs/notification-examples.md index ed7c2c1fe..52f9a7a20 100644 --- a/docs/notification-examples.md +++ b/docs/notification-examples.md @@ -32,7 +32,7 @@ automation: data_template: message: "A {{trigger.payload_json['after']['label']}} has left the yard." data: - image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}.jpg" + image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg" tag: "{{trigger.payload_json['after']['id']}}" - alias: Notify for dogs in the front with a high top score @@ -48,7 +48,7 @@ automation: data_template: message: 'High confidence dog detection.' data: - image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}.jpg" + image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg" tag: "{{trigger.payload_json['after']['id']}}" ``` @@ -66,6 +66,6 @@ automation: data: photo: # this url should work for addon users - - url: 'http://ccab4aaf-frigate:5000/events/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg' + - url: 'http://ccab4aaf-frigate:5000/api/events/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg' caption : 'A {{trigger.payload_json["after"]["label"]}} was detected on {{ trigger.payload_json["after"]["camera"] }} camera' ```