Open sciorty opened 7 months ago
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (automation
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
automation documentation automation source (message by IssueLinks)
Just wanted to report I'm seeing a similar unexpected behaviour when running automations and specifically services. As I was trying to loop through attempting to lock a smart lock, to address sporadic (not that much, actually) Matter over Thread downtimes, the automation does instead error out and fail, not allowing to achieve the wanted behaviour.
Example if helpful.
service: lock.lock
continue_on_error: true
data: {}
target:
entity_id:
- lock.front_door_nuki_lock_4
Executed: 15 April 2024 at 21:21:35
Error: src/inet/UDPEndPointImplSockets.cpp:417: OS Error 0x02000013: No such device
Result:
params:
domain: lock
service: lock
service_data: {}
target:
entity_id:
- lock.front_door_nuki_lock_4
running_script: false
Same issue here. I have an automation that calls a bunch of ESPHome services on different devices. If one of the devices is offline for any reason the automation stops, regardless of the "continue_on_error" flag being set.
HA Core 2024.4.2 This is a new automation so I'm not sure if this has worked in prior versions of HA.
I'm aslo having this issue. Every step of the automation has continue_on_error: true
Are there any news on this issue? I experience similar problems when using continue_on_error
Same here, what is the status of that one ?
Hi, same error on scripts. HA version 2024.9.2 Frontend 20240909.1
Same issue for me. Device looses connection and therefore throws an error in the script. Added continue on error to true for that action and it does not continue regardless. Really frustrating
For anyone encountering similar issues (where an Automation or Script fails/stops after a device/service error, despite continue_on_error: true
being set):
This behavior indicates a bug in the Integration that supports the relevant device/service, and you should file a bug report against each Integration that has this problem.
More specifically: Per the integration developer docs, Integrations should raise HomeAssistantError
exceptions for device communication failures on action calls. continue_on_error
only catches/ignores HomeAssistantError
exceptions; Other exceptions will still cause an Automation/Script to fail/stop. Hence, an Automation/Script failing/stopping after an action error (when continue_on_error
is set) indicates that the Integration is not properly translating exceptions (catching generic exceptions from underlying libraries and raising exceptions derived from HomeAssistantError
in their place). This is considered a bug in the Integration. (The fix for #73344 in the nuki Integration, or this code in the Google Generative AI Integration, are examples of how an Integration can be fixed to properly handle this.)
I have submitted a bug report for one of these issues in the Matter Integration here: #128246
The problem
Hi,
I think this is a duplicate of https://github.com/home-assistant/core/issues/73344 but it was closed and didn't really addressed the continue_on_error functioning but rather the source of the error.
I have the same problem but with an automation that among other things turns OFF a TV that often becomes unavailable after some minutes and then available again. Now, i would be happy for sure to solve the issue of the TV becoming unavailable (philips 55PUS7906 with ADB), but here i would like to know why the continue_on_error seems to be ininfluent on the automation:
I also tried a workaround as someone suggested, by embedding the failing action into a script, but did not work:
I'm now trying to set the continue_on_error also into the script, but as I see from documentation it should also work on automations YAML.
Am I missing something or is this continue_on_error not working?
What version of Home Assistant Core has the issue?
2024.4.2
What was the last working version of Home Assistant Core?
/
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
/
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response