Add additional error handling for automation script run (#45613)
This commit is contained in:
parent
5711d61b38
commit
7673f57248
3 changed files with 10 additions and 0 deletions
|
@ -404,6 +404,12 @@ class AutomationEntity(ToggleEntity, RestoreEntity):
|
|||
await self.action_script.async_run(
|
||||
variables, trigger_context, started_action
|
||||
)
|
||||
except (vol.Invalid, HomeAssistantError) as err:
|
||||
self._logger.error(
|
||||
"Error while executing automation %s: %s",
|
||||
self.entity_id,
|
||||
err,
|
||||
)
|
||||
except Exception: # pylint: disable=broad-except
|
||||
self._logger.exception("While executing automation %s", self.entity_id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue