From f20b1d75e608685442da0e9a6a6cb4f0c810f4a0 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 13 Dec 2020 09:50:06 -0600 Subject: [PATCH] add telegram example --- docs/notification-examples.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/notification-examples.md b/docs/notification-examples.md index 152d91c33..ed7c2c1fe 100644 --- a/docs/notification-examples.md +++ b/docs/notification-examples.md @@ -1,5 +1,6 @@ # Notification examples +Here are some examples of notifications for the HomeAssistant android companion app: ```yaml automation: @@ -50,3 +51,21 @@ automation: image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}.jpg" tag: "{{trigger.payload_json['after']['id']}}" ``` + +If you are using telegram, you can fetch the image directly from Frigate: +```yaml +automation: + - alias: Notify of events + trigger: + platform: mqtt + topic: frigate/events + action: + - service: notify.telegram_full + data_template: + message: 'A {{trigger.payload_json["after"]["label"]}} was detected.' + data: + photo: + # this url should work for addon users + - url: 'http://ccab4aaf-frigate:5000/events/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg' + caption : 'A {{trigger.payload_json["after"]["label"]}} was detected on {{ trigger.payload_json["after"]["camera"] }} camera' +```