mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add missing exception translations to Comelit (#142861)
* Add missing exception translations to Comelit * update quality scale * remove unwanted placeholder
This commit is contained in:
parent
0aabb11220
commit
735e2e4192
@ -96,9 +96,16 @@ class ComelitBaseCoordinator(DataUpdateCoordinator[T]):
|
|||||||
await self.api.login()
|
await self.api.login()
|
||||||
return await self._async_update_system_data()
|
return await self._async_update_system_data()
|
||||||
except (CannotConnect, CannotRetrieveData) as err:
|
except (CannotConnect, CannotRetrieveData) as err:
|
||||||
raise UpdateFailed(repr(err)) from err
|
raise UpdateFailed(
|
||||||
|
translation_domain=DOMAIN,
|
||||||
|
translation_key="update_failed",
|
||||||
|
translation_placeholders={"error": repr(err)},
|
||||||
|
) from err
|
||||||
except CannotAuthenticate as err:
|
except CannotAuthenticate as err:
|
||||||
raise ConfigEntryAuthFailed from err
|
raise ConfigEntryAuthFailed(
|
||||||
|
translation_domain=DOMAIN,
|
||||||
|
translation_key="cannot_authenticate",
|
||||||
|
) from err
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
async def _async_update_system_data(self) -> T:
|
async def _async_update_system_data(self) -> T:
|
||||||
|
@ -70,9 +70,7 @@ rules:
|
|||||||
entity-device-class: done
|
entity-device-class: done
|
||||||
entity-disabled-by-default: done
|
entity-disabled-by-default: done
|
||||||
entity-translations: done
|
entity-translations: done
|
||||||
exception-translations:
|
exception-translations: done
|
||||||
status: todo
|
|
||||||
comment: PR in progress
|
|
||||||
icon-translations: done
|
icon-translations: done
|
||||||
reconfiguration-flow:
|
reconfiguration-flow:
|
||||||
status: todo
|
status: todo
|
||||||
|
@ -74,7 +74,10 @@
|
|||||||
"message": "Error connecting: {error}"
|
"message": "Error connecting: {error}"
|
||||||
},
|
},
|
||||||
"cannot_authenticate": {
|
"cannot_authenticate": {
|
||||||
"message": "Error authenticating: {error}"
|
"message": "Error authenticating"
|
||||||
|
},
|
||||||
|
"updated_failed": {
|
||||||
|
"message": "Failed to update data: {error}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user