Add Doorbell Snapshot Service
This commit is contained in:
@@ -144,6 +144,13 @@ input_button:
|
|||||||
shell_command:
|
shell_command:
|
||||||
doorbell_camera_set_online: !secret doorbell_camera_online_command
|
doorbell_camera_set_online: !secret doorbell_camera_online_command
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Doorbell Event Start Command
|
||||||
|
rest_command:
|
||||||
|
doorbell_start_event:
|
||||||
|
url: !secret frigate_doorbell_event_url
|
||||||
|
method: post
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Security Scripts
|
# Security Scripts
|
||||||
script:
|
script:
|
||||||
@@ -501,7 +508,38 @@ automation:
|
|||||||
entity_id: binary_sensor.doorbell_alarm_local
|
entity_id: binary_sensor.doorbell_alarm_local
|
||||||
to: 'on'
|
to: 'on'
|
||||||
action:
|
action:
|
||||||
- service: notify.everyone
|
- service: rest_command.doorbell_start_event
|
||||||
data:
|
response_variable: event_data
|
||||||
title: 'Doorbell'
|
|
||||||
message: 'Home Doorbell Rang'
|
- if: "{{ event_data['status'] == 200 }}"
|
||||||
|
then:
|
||||||
|
- service: notify.everyone
|
||||||
|
data:
|
||||||
|
title: 'Doorbell'
|
||||||
|
message: 'Home Doorbell Rang'
|
||||||
|
data:
|
||||||
|
image: "/api/frigate/notifications/{{ event_data['content']['event_id'] }}/thumbnail.jpg"
|
||||||
|
clickAction: "https://hass.kraussnet.com/api/frigate/notifications/{{ event_data['content']['event_id'] }}/snapshot.jpg"
|
||||||
|
ttl: 0
|
||||||
|
priority: high
|
||||||
|
actions:
|
||||||
|
- action: URI
|
||||||
|
title: View Clip
|
||||||
|
uri: "https://hass.kraussnet.com/api/frigate/notifications/{{ event_data['content']['event_id'] }}/clip.mp4"
|
||||||
|
- action: URI
|
||||||
|
title: View Snapshot
|
||||||
|
uri: "https://hass.kraussnet.com/api/frigate/notifications/{{ event_data['content']['event_id'] }}/snapshot.jpg"
|
||||||
|
|
||||||
|
- service: persistent_notification.create
|
||||||
|
data:
|
||||||
|
notification_id: "camera-{{ event_data['content']['event_id'] }}"
|
||||||
|
title: "Doorbell Rang"
|
||||||
|
message: >-
|
||||||
|

|
||||||
|
[View Clip](/api/frigate/notifications/{{ event_data['content']['event_id'] }}/clip.mp4)
|
||||||
|
|
||||||
|
else:
|
||||||
|
- service: notify.everyone
|
||||||
|
data:
|
||||||
|
title: "Doorbell"
|
||||||
|
message: "Home Doorbell Rang but could not create event: {{ event_data['content']['message'] }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user