Some checks failed
Savin's Home Assistant / build (push) Failing after 1m45s
322 lines
12 KiB
YAML
322 lines
12 KiB
YAML
---
|
|
- alias: '[Frigate] Person detected by Doorbell camera'
|
|
mode: parallel
|
|
max: 10
|
|
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: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "Person detected by Doorbell camera"
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person detected by Doorbell camera (Face)'
|
|
mode: parallel
|
|
max: 10
|
|
trigger:
|
|
platform: mqtt
|
|
topic: frigate/events
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: "{{ trigger.payload_json['after']['label'] == 'face' }}"
|
|
- condition: template
|
|
value_template: "{{ trigger.payload_json['after']['camera'] == 'doorbell' }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "Person (Face) detected by Doorbell camera"
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] License plate detected by Doorbell camera'
|
|
mode: parallel
|
|
max: 10
|
|
trigger:
|
|
platform: mqtt
|
|
topic: frigate/events
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: "{{ trigger.payload_json['after']['label'] == 'license_plate' }}"
|
|
- condition: template
|
|
value_template: "{{ trigger.payload_json['after']['camera'] == 'doorbell' }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "License plate detected by Doorbell camera"
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
#- alias: '[Frigate] Car detected by Doorbell camera'
|
|
# trigger:
|
|
# platform: mqtt
|
|
# topic: frigate/events
|
|
# condition:
|
|
# condition: and
|
|
# conditions:
|
|
# - condition: template
|
|
# value_template: "{{ trigger.payload_json['after']['label'] == 'car' }}"
|
|
# - condition: template
|
|
# value_template: "{{ trigger.payload_json['after']['camera'] == 'doorbell' }}"
|
|
# action:
|
|
# - service: telegram_bot.send_photo
|
|
# data:
|
|
# target: "-1002338954143"
|
|
# message_thread_id: 2
|
|
# message_tag: frigate
|
|
# caption: "Car detected by Doorbell camera"
|
|
# url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person enters Driveway Zone'
|
|
mode: parallel
|
|
max: 10
|
|
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-frontyard-driveway-1' in trigger.payload_json['after']['entered_zones'] }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "A {{trigger.payload_json['after']['label']}} has entered the driveway."
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person leaves Driveway Zone'
|
|
mode: parallel
|
|
max: 10
|
|
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-frontyard-driveway-1' in trigger.payload_json['before']['current_zones'] }}"
|
|
- condition: template
|
|
value_template: "{{ not 'zone-frontyard-driveway-1' in trigger.payload_json['after']['current_zones'] }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "A {{trigger.payload_json['after']['label']}} has left the yard."
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person enters Frontyard Property Zone'
|
|
mode: parallel
|
|
max: 10
|
|
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-frontyard-property-1' in trigger.payload_json['after']['entered_zones'] }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "A {{trigger.payload_json['after']['label']}} has entered the frontyard."
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person leaves Frontyard Property Zone'
|
|
mode: parallel
|
|
max: 10
|
|
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-frontyard-property-1' in trigger.payload_json['before']['current_zones'] }}"
|
|
- condition: template
|
|
value_template: "{{ not 'zone-frontyard-property-1' in trigger.payload_json['after']['current_zones'] }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "A {{trigger.payload_json['after']['label']}} has left the frontyard."
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person enters Side 1 Property Zone'
|
|
mode: parallel
|
|
max: 10
|
|
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-side1-property-1' in trigger.payload_json['after']['entered_zones'] }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "A {{trigger.payload_json['after']['label']}} has entered the side 1."
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person leaves Side 1 Property Zone'
|
|
mode: parallel
|
|
max: 10
|
|
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-side1-property-1' in trigger.payload_json['before']['current_zones'] }}"
|
|
- condition: template
|
|
value_template: "{{ not 'zone-side1-property-1' in trigger.payload_json['after']['current_zones'] }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "A {{trigger.payload_json['after']['label']}} has left the side 1."
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person enters Side 2 Property Zone'
|
|
mode: parallel
|
|
max: 10
|
|
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-side2-property-1' in trigger.payload_json['after']['entered_zones'] }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "A {{trigger.payload_json['after']['label']}} has entered the side 2."
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
- alias: '[Frigate] Person leaves Side 2 Property Zone'
|
|
mode: parallel
|
|
max: 10
|
|
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-side2-property-1' in trigger.payload_json['before']['current_zones'] }}"
|
|
- condition: template
|
|
value_template: "{{ not 'zone-side2-property-1' in trigger.payload_json['after']['current_zones'] }}"
|
|
action:
|
|
- service: telegram_bot.send_photo
|
|
data:
|
|
target: "-1002338954143"
|
|
message_thread_id: 2
|
|
message_tag: frigate
|
|
caption: "A {{trigger.payload_json['after']['label']}} has left the side 2."
|
|
url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
#- alias: '[Frigate] Car enters Driveway Zone'
|
|
# trigger:
|
|
# platform: mqtt
|
|
# topic: frigate/events
|
|
# condition:
|
|
# condition: and
|
|
# conditions:
|
|
# - condition: template
|
|
# value_template: "{{ trigger.payload_json['after']['label'] == 'car' }}"
|
|
# - condition: template
|
|
# value_template: "{{ 'zone-frontyard-driveway-1' in trigger.payload_json['after']['entered_zones'] }}"
|
|
# action:
|
|
# - service: telegram_bot.send_photo
|
|
# data:
|
|
# target: "-1002338954143"
|
|
# message_thread_id: 2
|
|
# message_tag: frigate
|
|
# caption: "A {{trigger.payload_json['after']['label']}} has entered the driveway."
|
|
# url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
#- alias: '[Frigate] Car leaves Driveway Zone'
|
|
# trigger:
|
|
# platform: mqtt
|
|
# topic: frigate/events
|
|
# condition:
|
|
# condition: and
|
|
# conditions:
|
|
# - condition: template
|
|
# value_template: "{{ trigger.payload_json['after']['label'] == 'car' }}"
|
|
# - condition: template
|
|
# value_template: "{{ 'zone-frontyard-driveway-1' in trigger.payload_json['before']['current_zones'] }}"
|
|
# - condition: template
|
|
# value_template: "{{ not 'zone-frontyard-driveway-1' in trigger.payload_json['after']['current_zones'] }}"
|
|
# action:
|
|
# - service: telegram_bot.send_photo
|
|
# data:
|
|
# target: "-1002338954143"
|
|
# message_thread_id: 2
|
|
# message_tag: frigate
|
|
# caption: "A {{trigger.payload_json['after']['label']}} has left the yard."
|
|
# url: "https://objects.savin.nyc/api/events/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
|
|
|
|
|
|
# - 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']}}"
|