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, };