39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
# Automation version of notification
|
|
action: notify.mobile_app_sm_n986b
|
|
data_template:
|
|
message: A {{trigger.payload_json["after"]["label"]}} was detected.
|
|
title: Frigate
|
|
data:
|
|
image: >-
|
|
https://home-assistant.sthome.org/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android
|
|
tag: "{{trigger.payload_json[\"after\"][\"id\"]}}"
|
|
when: "{{trigger.payload_json[\"after\"][\"start_time\"]|int}}"
|
|
actions:
|
|
- action: URI
|
|
title: Open Image
|
|
uri: >-
|
|
https://home-assistant.sthome.org/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android
|
|
enabled: true
|
|
|
|
# script version of notification
|
|
alias: Send Dynamic Notification To All Devices
|
|
sequence:
|
|
- data:
|
|
message: "{{ message }}"
|
|
title: "{{ title }}"
|
|
data: null
|
|
url: "{{ video }}"
|
|
tag: "{{ notifTag }}"
|
|
group: "{{ group }}"
|
|
attachment:
|
|
url: >-
|
|
{% if (importance == "default" and video != null) -%} {{ video }} {%-
|
|
else -%} {{ image }} {%- endif %}
|
|
push:
|
|
interruption-level: >-
|
|
{% if importance == "max" -%} time-sensitive {%- else -%} passive {%-
|
|
endif %}
|
|
action: notify.mobile_app_sm_n986b
|
|
mode: single
|
|
icon: mdi:bell-ring-outline
|
|
max: 10 |