From db7caf1c32d6420cee1cda9759174ee5f8f2424f Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Fri, 8 Sep 2023 06:54:54 -0700 Subject: [PATCH] Fix default formatEntityState function (#17852) --- src/state/connection-mixin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index 66c3f211badb..76e4c5008cef 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -177,10 +177,10 @@ export const connectionMixin = >( // @ts-ignore this._loadFragmentTranslations(this.hass?.language, fragment), formatEntityState: (stateObj, state) => - (state !== null ? state : stateObj.state) ?? "", + (state != null ? state : stateObj.state) ?? "", formatEntityAttributeName: (_stateObj, attribute) => attribute, formatEntityAttributeValue: (stateObj, attribute, value) => - value !== null ? value : stateObj.attributes[attribute] ?? "", + value != null ? value : stateObj.attributes[attribute] ?? "", ...getState(), ...this._pendingHass, };