From 2366db993339276ba6f99e717e6c1e99cc5c383c Mon Sep 17 00:00:00 2001 From: jbouwh Date: Mon, 30 Oct 2023 13:22:36 +0000 Subject: [PATCH] Follow up --- src/state/connection-mixin.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index e7e9e8313898..cafc9cf46f04 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -122,19 +122,19 @@ export const connectionMixin = >( } if (notifyOnError) { forwardHaptic("failure"); - const lokalizedErrorMessage = (this as any).hass.localize( + const localizedErrorMessage = (this as any).hass.localize( `component.${err.translation_domain}.exceptions.${err.translation_key}.message`, err.translation_placeholders ); const message = - lokalizedErrorMessage || + localizedErrorMessage || (this as any).hass.localize( "ui.notification_toast.service_call_failed", "service", `${domain}/${service}` ) + ` ${ - (lokalizedErrorMessage ? "" : err.message) || + err.message || (err.error?.code === ERR_CONNECTION_LOST ? "connection lost" : "unknown error")