diff --git a/src/layouts/home-assistant.ts b/src/layouts/home-assistant.ts index f955793a3a75..f9781eef5db5 100644 --- a/src/layouts/home-assistant.ts +++ b/src/layouts/home-assistant.ts @@ -173,9 +173,6 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) { // @ts-ignore this._loadHassTranslations(this.hass!.language, "state"); - // @ts-ignore - this._loadHassTranslations(this.hass!.language, "exceptions"); - document.addEventListener( "visibilitychange", () => this._checkVisibility(), diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index cafc9cf46f04..f5eae4519162 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -122,7 +122,11 @@ export const connectionMixin = >( } if (notifyOnError) { forwardHaptic("failure"); - const localizedErrorMessage = (this as any).hass.localize( + const lokalize = await (this as any).loadBackendTranslation( + "exceptions", + domain + ); + const localizedErrorMessage = lokalize( `component.${err.translation_domain}.exceptions.${err.translation_key}.message`, err.translation_placeholders );