mirror of
https://github.com/home-assistant/core.git
synced 2026-07-10 00:05:13 +01:00
MELCloud Home refactor error translations (#173852)
This commit is contained in:
@@ -90,19 +90,16 @@ class MelCloudHomeCoordinator(DataUpdateCoordinator[UserContext]):
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="invalid_auth",
|
||||
translation_placeholders={"error": repr(err)},
|
||||
) from err
|
||||
except MelCloudHomeConnectionError as err:
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="cannot_connect",
|
||||
translation_placeholders={"error": repr(err)},
|
||||
) from err
|
||||
except MelCloudHomeTimeoutError as err:
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="timeout_connect",
|
||||
translation_placeholders={"error": repr(err)},
|
||||
) from err
|
||||
else:
|
||||
return data
|
||||
|
||||
@@ -90,13 +90,13 @@
|
||||
},
|
||||
"exceptions": {
|
||||
"cannot_connect": {
|
||||
"message": "Error communicating with MELCloud Home API: {error}"
|
||||
"message": "Error communicating with MELCloud Home API"
|
||||
},
|
||||
"invalid_auth": {
|
||||
"message": "An error occurred while trying to authenticate: {error}"
|
||||
"message": "An error occurred while trying to authenticate"
|
||||
},
|
||||
"timeout_connect": {
|
||||
"message": "Timeout while communicating with MELCloud Home API: {error}"
|
||||
"message": "Timeout while communicating with MELCloud Home API"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user