#Notify when automations fails to run

1 messages · Page 1 of 1 (latest)

simple garnet
#

Hi,
Is there a way to be notified when an automation fails to run? Kind of like a try/catch solution?
I discovered one of my automations had failed to run and the temperature hence dropped significantly. :/

swift gust
simple garnet
#

After the trigger

#

The trigger works fine, but after that it ran into issues and failed to execute the rest of the automation

swift gust
#

you are probably better off fixing the edge case.

however you could I guess do something like:
run a paralell
then inside that you run your usual stuff in a sequence
then seperatly running in paralell you have a sequence that waits for your last thing to happen. e.g. heating on entity changes. then you could have a timeout on that wait. so if after 5 minutes it hasnt triggered you could send an alert.

this feels hacky though

wanton ocean
simple garnet
#

Thanks @swift gust and @wanton ocean. I'll give both a try.

night elbow
# simple garnet Hi, Is there a way to be notified when an automation fails to run? Kind of like ...

You can do this natively in HA. If you set the following in your config, you can trigger off entries to your system log:

system_log:
  fire_event: true

That then allows you to create an automation with the following trigger:

triggers:
  - trigger: event
    event_type: system_log_event
    event_data:
      name: homeassistant.components.automation
      level: WARNING

The details are documented here: https://www.home-assistant.io/integrations/system_log/#events