Hi, and thank you in advance for your support!
I’m trying to implement the following Frigate Automation, re Home Assistant notifications | Frigate
and I receive the following error when I run/test the automation.
Error: Error rendering data template: UndefinedError: ‘dict object’ has no attribute ‘payload_json’
Could you please help troubleshoot the automation?
the automation:
id: '1667754760785'
alias: Front Door Snapshot Fired
description: ''
trigger:
- platform: mqtt
topic: frigate/events
payload: switch.frontdoor_snapshots
condition: []
action:
- service: notify.mobile_app_be2015
data:
title: Someone is at the front door!
message: Dingdong, who is at the front door?
data_template:
message: A {{trigger.payload_json["after"]["label"]}} was detected.
data:
image: >-
https://externalURL/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg?format=android
tag: '{{trigger.payload_json["after"]["id"]}}'
when: '{{trigger.payload_json["after"]["start_time"]|int}}'
mode: single