Browse Source

add example for ios camera live feed notification

Blake Blackshear 3 years ago
parent
commit
e7026dfd6e
1 changed files with 24 additions and 0 deletions
  1. 24 0
      docs/docs/guides/ha_notifications.md

+ 24 - 0
docs/docs/guides/ha_notifications.md

@@ -25,6 +25,30 @@ automation:
             when: '{{trigger.payload_json["after"]["start_time"]|int}}'
             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
 
 
 Conditions with the `before` and `after` values allow a high degree of customization for automations.
 Conditions with the `before` and `after` values allow a high degree of customization for automations.