From e7026dfd6ebeef9ff91cac9a3e99de6f21343a6d Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 6 Feb 2022 13:46:57 -0600 Subject: [PATCH] add example for ios camera live feed notification --- docs/docs/guides/ha_notifications.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/docs/guides/ha_notifications.md b/docs/docs/guides/ha_notifications.md index b8070a90c..179a9bbea 100644 --- a/docs/docs/guides/ha_notifications.md +++ b/docs/docs/guides/ha_notifications.md @@ -25,6 +25,30 @@ automation: when: '{{trigger.payload_json["after"]["start_time"]|int}}' ``` +Note that iOS devices support live previews of cameras by adding a camera entity id to the message data. + +```yaml +automation: + - alias: Security_Frigate_Notifications + description: "" + trigger: + - platform: mqtt + topic: frigate/events + payload: new + value_template: "{{ value_json.type }}" + action: + - service: notify.mobile_app_iphone + data: + 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"]}}/thumbnail.jpg + tag: '{{trigger.payload_json["after"]["id"]}}' + when: '{{trigger.payload_json["after"]["start_time"]|int}}' + entity_id: camera.{{trigger.payload_json["after"]["camera"]}} + mode: single +``` + ## Conditions Conditions with the `before` and `after` values allow a high degree of customization for automations.