1
0
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:
Erwin Douna
2026-06-15 12:08:31 +02:00
committed by GitHub
parent 5ac1dd8288
commit 6dfe6472af
2 changed files with 3 additions and 6 deletions
@@ -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"
}
}
}