mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
alias: Frigate Notification Testing
|
|
id: automation_frigate_notification_testing
|
|
mode: single
|
|
max_exceeded: silent
|
|
|
|
trigger:
|
|
platform: mqtt
|
|
topic: frigate/events
|
|
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- "{{ 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
|
|
- "{{ 'from_street' in trigger.payload_json['after']['entered_zones'] }}"
|
|
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
|
|
|
action:
|
|
|
|
- choose:
|
|
- conditions:
|
|
- "{{ 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
|
|
- "{{ 'from_street' in trigger.payload_json['after']['entered_zones'] }}"
|
|
- "{{ trigger.payload_json['after']['top_score'] > 0.80 }}"
|
|
- "{{ not 'garage' in trigger.payload_json['before']['current_zones'] }}"
|
|
sequence:
|
|
- service: notify.mobile_app_pixel_7
|
|
data_template:
|
|
message: 'A {{trigger.payload_json["after"]["label"]}} entered the driveway.'
|
|
data:
|
|
image: 'https://automation.clintweaver.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
|
|
tag: '{{trigger.payload_json["after"]["id"]}}'
|
|
when: '{{trigger.payload_json["after"]["start_time"]|int}}'
|
|
|
|
- delay: '00:00:05'
|