Add Reolink unexpected error translation (#134807)

This commit is contained in:
starkillerOG 2025-01-08 10:58:28 +01:00 committed by GitHub
parent eff440d2a8
commit 7a2a6cf7d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -89,6 +89,9 @@
"timeout": {
"message": "Timeout waiting on a response: {err}"
},
"unexpected": {
"message": "Unexpected Reolink error: {err}"
},
"firmware_install_error": {
"message": "Error trying to update Reolink firmware: {err}"
},

View File

@ -168,6 +168,10 @@ def raise_translated_error(
translation_placeholders={"err": str(err)},
) from err
except ReolinkError as err:
raise HomeAssistantError(err) from err
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="unexpected",
translation_placeholders={"err": str(err)},
) from err
return decorator_raise_translated_error