Skip to content

Commit

Permalink
Follow up
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouwh committed Oct 30, 2023
1 parent e8f06e5 commit 2366db9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/state/connection-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,19 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
}
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")
Expand Down

0 comments on commit 2366db9

Please sign in to comment.