Continue on Error to Visual Editor

As we think about useability and non-techy users, i think Continue on Error is incredibly important. For those with unreliable networks or devices that may fall offline, the ability to easily select continue on error for Actions would be really important.

I have been a HA user for about a year and a half and didnt know this existed. Occasionally a zwave, zigbee, or wifi device would become unresponsive and tank my automations causing a lot of headaches.

Having this as a checkbox in the UI (or something similar) would be a very helpful addition to the platform.

It was added 7 months ago and was mentioned in the May 2022 Release Notes.

The documentation was updated as well. Reference: Continuing on error

The Automation and Script Editors, in “Visual” mode, are targeted at novices so every possible scripting function isn’t explicitly displayed to avoid overwhelming the user with choices. However, it’s possible to switch from “Visual” to “YAML” mode and enter any scripting function.

Reference: Script Syntax

1 Like

Are my manual yaml edits overriden if I make changes on the visual mode again?

Once you make a change not supported by visual, you cant flip back to visual. You have to stay in scripting mode. If you remove the unsupported code, you can then go back to visual without an issue

It would be easier for novices if continue on error was the default.

So ‘ignore all service call errors’ by default? I wouldn’t vote for that.

For example, I have 20+ tasks for my goodnight script. Last night it failed because of some transient cloud issue. There is zero feedback on this, and wasn’t noticed until this morning when I noticed some lights still on.

The Bourne shell continues on error by default, and has so for 45+ years. If you don’t want continue on error, you can change the option at the top of the script. You could have ‘continue on error’ available as a global default, which then you can override at the script level, and lastly override at the task level.

For my script, should just refactor it to run in a parallel block, that way it one task can’t cause another to fail.

I believe the red text in your screenshot counts as feedback and it’s probably also duplicated in the Log.

There was no feedback when I ran the script that it failed. The log only says the script was started. When a device or integration fails, it’s marked red. For myself (and many others), most days I don’t look at homeassistant. If my automations work, then I don’t need an app. When something doesn’t work, then I use the app. The log doesn’t have any way to filter by errors, and I can’t visually see if any automations or scripts failed in their last run.

Are you saying the error message that is displayed in the script’s trace was not reported in the Log?

If so, report that as an Issue in Home Assistant’s GitHub Core repository. The Log is meant to be a record of errors and warnings produced during the execution of automations and scripts (and other things).

If you want automations/scripts to present the same visual indicator, post a Feature Request.

FWIW, there are examples in the forum of an automation that monitors the Log for specific kinds of errors and reports them as a notification (i.e. text message). It’s a neat way og being apprised of problems when they occur without having to manually peruse the Log.

Where is this notification automation that sends error reports on specific kinds of errors?

I would love to have continue on error work for many of my automations that otherwise give me unknown grief until I realize it after failing on some actions, but not at the expense of forcing everything into YAML.