Fix notification error when calling service (#17255)

This commit is contained in:
Paul Bottein 2023-07-10 15:01:16 +02:00 committed by GitHub
parent 228b75ae83
commit bffdfcf61c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,9 +123,10 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
`${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;