initial commit
This commit is contained in:
62
configuration/automation/notification_frigate.yaml
Normal file
62
configuration/automation/notification_frigate.yaml
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
- alias: '[Frigate] Person enters Driveway Zone'
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
||||
- condition: template
|
||||
value_template: "{{ 'zone_driveway' in trigger.payload_json['after']['entered_zones'] }}"
|
||||
action:
|
||||
- service: notify.telegram_alex
|
||||
data:
|
||||
message: "A {{trigger.payload_json['after']['label']}} has entered the yard."
|
||||
data:
|
||||
photo:
|
||||
- url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
||||
# caption: "{{trigger.payload_json['after']['id']}}"
|
||||
|
||||
- alias: '[Frigate] Person leaves Driveway Zone'
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
||||
- condition: template
|
||||
value_template: "{{ 'zone_driveway' in trigger.payload_json['before']['current_zones'] }}"
|
||||
- condition: template
|
||||
value_template: "{{ not 'zone_driveway' in trigger.payload_json['after']['current_zones'] }}"
|
||||
action:
|
||||
- service: notify.telegram_alex
|
||||
data:
|
||||
message: "A {{trigger.payload_json['after']['label']}} has left the yard."
|
||||
data:
|
||||
photo:
|
||||
- url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
||||
# caption: "{{trigger.payload_json['after']['id']}}"
|
||||
|
||||
- alias: '[Frigate] Person detected by Doorbell camera'
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.payload_json['after']['camera'] == 'doorbell' }}"
|
||||
action:
|
||||
- service: notify.telegram_alex
|
||||
data_template:
|
||||
message: 'Person detected by Doorbell camera'
|
||||
data:
|
||||
photo:
|
||||
- url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
||||
# caption: "{{trigger.payload_json['after']['id']}}"
|
Reference in New Issue
Block a user