WTH can’t continue on error be set for entire automation

Currently, “continue_on_error” works great on a per-action basis, but there’s no way to apply it globally to an entire automation. For automations with many actions, it’s tedious to add this to every step individually.

Why isn’t there a global option for this?

It would also be a lot quicker if it could be done with checkboxes in the GUI instead of in YAML.
This particular thing has been driving me nuts. Every other day, one of my LIFX bulbs decides it’s on strike, and that results in my entire morning automation failing. Not a great start to my day when I have to start by poking around in HA to see if my alarm is still armed in stay mode or if my “sleep mode” boolean is on or off (which affects a number of things like announcements). I just want to check a box in the automation and let it run. If one of my lightbulbs decides to crap out, then so be it. I still want to hear the news and weather.

3 Likes

YES this was the first thing that came to mind when I saw this WTH month. It’s driving me nuts to have to remember to paste this into pretty much EVERY action since I learnt about it.

Was planning to make a video about this stupidity soon to because errors from occasionally unreliable devices were driving me MAD.

1 Like

It would be nice to be able to set the error handling method of an automation from within the UI. ATM, if there is an error in an automation (e.g. a device or integration offline) then the whole automation fails to run when it is called.

We work around this currently by setting ‘continue_on_error: true’ manually via yaml in every action of the automation, but this is quite tedious and time consuming.

It would be great if you could tick a box to ‘Continue On Error’ for the entire automation, where the automation would just move onto the next step if any part of it failed or errored.

We have an automation for our robotic vacuum that announces ‘Your room is about to be vacuumed’ before it coms in to clean a room, but when we had the Alexa integration issues just the other day after the 2024.12 update, the vacuum failed to clean any room because the Alexa integration caused an error in the automation. Whereas if we had a tick a box to ‘Continue On Error’ for the entire automation, the rooms would have been cleaned; the vacuum would have just crept up on us like a ninja in the night without any announcements!

Cheers, Chris Orban.

Yes adding it to the GUI is a must.
I guess the most common scenario is similar to this (pseudo python)

if time.now()==triggertime:
    light_1.on()
    light_2.on()
    light_3.on()

If light_2.on() fails (throws exception) light_3.on() is newer executed.

looks like this in GUI
image

If the sequence is not important you can just use the existing “parallel” action.

If you take the time to read a lot of docs, and finally find this in the doc for scripts !!! :scream:

If the sequence in important:

You could combine the continue_on_error:true with a new throw catch setup
(continue_on_error being global)
similar to this pseudo code

if time.now()==triggertime:
    try:
        light_1.on()
        light_2.on()
        light_3.on()
    except:
        do_error_action  # i.e. send message that automation xy failed. 

The simple version as depicted by the pseudo code could be hardcoded in all automations, probably creating an event under the hood. In the GUI it will seen as an extra chapter, so the current page design

  • when
  • if
  • action

is extended to

  • when
  • if
  • action
  • on error do

A slightly more advanced version would be to get a new throw/catch action, similar to the if-else action. This would allow for something like this

if time.now()==triggertime:
    try:
        light_1.on()
    except:
        send_message("light_1 failed")
    try:
        light_2.on()
    except:
        send_message("light_2 failed")
    try:
        light_3.on()
    except:
        send_message("light_3 failed")

You could consider to allow the except action decide if script continues or not.