Add additional error handling for automation script run (#45613)

This commit is contained in:
Marc Mueller
2021-01-28 09:26:41 +01:00
committed by GitHub
parent 5711d61b38
commit 7673f57248
3 changed files with 10 additions and 0 deletions

View File

@@ -291,6 +291,9 @@ class _ScriptRun:
elif isinstance(exception, exceptions.ServiceNotFound):
error_desc = "Service not found"
elif isinstance(exception, exceptions.HomeAssistantError):
error_desc = "Error"
else:
error_desc = "Unexpected error"
level = _LOG_EXCEPTION