Skip to content

Commit

Permalink
add telegram example
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Jan 27, 2021
1 parent a4b88ac commit f20b1d7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/notification-examples.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Notification examples

Here are some examples of notifications for the HomeAssistant android companion app:
```yaml
automation:

Expand Down Expand Up @@ -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: 'https://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'
```

0 comments on commit f20b1d7

Please sign in to comment.