Have you ever ever had a House Assistant automation grind to a halt as a result of one thing went unsuitable throughout one of many actions? Generally that is fascinating, however in some circumstances, it may be higher if the remainder of the automation continues to run even when one of many actions fails. Because of a latest House Assistant replace, it is now attainable to get your automations to proceed working even when an error happens.
Associated
4 House Assistant blueprints that saved me hours of effort
You needn’t reinvent the wheel.
House Assistant automations have at all times been weak to errors
One failed motion may deliver every thing down
Credit score: Bertel King / How-To Geek
Till not too long ago, some House Assistant automations had a weak spot. If an motion in your automation failed, your complete automation would cease at that time, and not one of the subsequent actions would run.
Actions may fail for any variety of causes, similar to a service not being discovered, attempting to carry out an motion that the goal entity cannot do, or when an integration is having an issue speaking with a tool. When this occurs, House Assistant raises an error that may trigger the automation to cease working.
There was an choice to alter this default conduct by including continue_on_error: true to the YAML of an automation. Nonetheless, till the latest replace, it wasn’t attainable to alter this setting within the UI of the automation editor.
Maintaining automations working meant extra wor
You wanted to construct round failure
Credit score: Adam Davidson / How-To Geek
The Proceed on Error characteristic already existed as an choice for YAML automations, however in case you wished to create them within the automation editor, the characteristic wasn’t obtainable. This meant you would need to make adjustments to your automation to deal with errors and be sure that your automation would nonetheless proceed to run.
This concerned workarounds similar to splitting automations into parallel branches, in order that one department failing would not cease the others from working. Another choice was to verify that an motion would run earlier than you really ran it and skip that particular motion if it was going to fail.
All of this meant that your automations needed to be far more advanced than they wanted to be. Guaranteeing that an automation would proceed to run if an motion produced an error usually required some cautious planning.
Proceed on Error makes automations extra resilient
Failed steps are not to be feared
The excellent news is that Proceed on Error has lastly been added to the automation editor in House Assistant. This implies you could apply the setting to any motion utilizing the UI relatively than having to manually add the road to the automation’s YAML. Whereas Proceed on Error is off by default, you possibly can flip it on for any motion in your automation.
To allow Proceed on Error for an motion, click on the three-dot icon for that motion. Choose Proceed on Error. You will see a Proceed on Error icon seem subsequent to the motion. To disable Proceed on Error, click on the three-dot icon and choose Proceed on Error once more. The icon ought to now disappear. Within the YAML view for the automation, you may see continue_on_error: true for any actions which have Proceed on Error enabled. It’s also possible to manually add this line in YAML relatively than utilizing the UI.
You continue to want good automation design
Proceed on Error simply makes issues simpler
If Proceed on Error is so helpful, why is not it on by default? The reason being that you do not essentially at all times need an automation to maintain working if an motion fails.
If Proceed on Error had been on by default, each automation would run to the top, irrespective of what number of intermediate actions failed. You could then be completely unaware that actions had been failing because the different actions would nonetheless be occurring as anticipated. Having an automation cease working when an motion fails makes it a lot simpler to identify when one thing has gone unsuitable.
The reality is that you do not at all times need to ignore each error that happens in your automations. Nonetheless, there are many conditions the place you continue to need the automation to finish, even when one thing does go unsuitable.
For instance, when you have a bedtime routine that performs an entire string of actions that features locking your entrance door, you do not need your entrance door to remain unlocked all evening simply because there was an issue turning off the good plug in your TV. The entrance door ought to lock no matter no matter else occurs, so utilizing Proceed on Error on this state of affairs is certainly worthwhile.
Different cases the place the characteristic could be helpful embody crucial notifications, similar to when a water leak or smoke is detected, or for heating automations the place you do not need your heating to maintain working all evening simply because a part of the automation failed.
It does not reduce the significance of excellent automation design. It merely signifies that it is faster and simpler to determine which actions ought to cease your automation in its tracks once they fail, and which could be ignored.
Dimensions (exterior)
4.41″L x 4.41″W x 1.26″H
Weight
12 Ounces
House Assistant Inexperienced is a pre-built hub immediately from the House Assistant group. It is a plug-and-play resolution that comes with every thing you should arrange House Assistant in your house without having to put in the software program your self.
A small repair with a big effect
Proceed on Error is not new, nevertheless it’s one thing that has been sorely lacking from the automation editor for a while. With the ability to change this setting shortly and simply within the UI makes it even simpler to create automations that do what you need, if you need.

