I have an automation that switches on a SmartThings air conditioner, waits 2hrs then turns it off again.
I find with SmartThings that the actions, such as setting temp and fan speed do sometimes fail and this then halts the automation steps and it’s never switched off.
My understanding was that by adding continue on error to be true, this will then ignore the failed step and continue, but when there is an error, it does still seem to stop the automation sequence.
Would anyone have any ideas about any changes I can make?
It’s not a good idea to have an automation run for two hours - a number of things could stop it completing (HA restarting, for example). Better to have one automation to start the air conditioner and another to stop it.
It’s not clear from your post how you are using continue on error. It needs to be set for each action - the example in the docs is:
- alias: "If this one fails..."
continue_on_error: true
action: notify.super_unreliable_service_provider
data:
message: "I'm going to error out..."
- alias: "This one will still run!"
action: persistent_notification.create
data:
title: "Hi there!"
message: "I'm fine..."
Perhaps you could post the yaml for the whole automation.
The docs also say:
Please note that continue_on_error will not suppress/ignore misconfiguration or errors that Home Assistant does not handle.
Thanks Jack. Okay I could adjust it into two.
I did try to add continue on error to each step.
I found with the SmartThings commands, if they were executed rapidly, I saw it error out more frequently, I added some 3s delays. 80% of the time it works without issue, but sometimes I get the Bad request response and it stops the automation, but you’re right, I could send the Off request, 2hrs after the Zigbee button is pressed that triggers it.