From bffdfcf61c4833293e9782aef4bdcc7c7921152a Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 10 Jul 2023 15:01:16 +0200 Subject: [PATCH] Fix notification error when calling service (#17255) --- src/state/connection-mixin.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index 8ba5091a02..ac5b27773f 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -123,9 +123,10 @@ export const connectionMixin = >( `${domain}/${service}` ) + ` ${ - err.message || err.error?.code === ERR_CONNECTION_LOST + err.message || + (err.error?.code === ERR_CONNECTION_LOST ? "connection lost" - : "unknown error" + : "unknown error") }`; fireEvent(this as any, "hass-notification", { message }); throw err;