I’m using an automation that’s triggered from a sys log event. I don’t think the yaml will post well but here goes:
alias: Notify of errors in automation
description: ""
triggers:
- event_type: system_log_event
event_data:
level: ERROR
trigger: event
conditions:
- condition: template
value_template: "{{ \"homeassistant.components.automation.\" in trigger.event.data.name }}"
actions:
- data:
title: Error in automation
message: >-
Automation {{trigger.event.data.name}} has the error {{
trigger.event.data.message }}
action: persistent_notification.create