Skip to content

Commit

Permalink
Fix default formatEntityState function (#17852)
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts authored Sep 8, 2023
1 parent 7176a51 commit db7caf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/state/connection-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
// @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,
};
Expand Down

0 comments on commit db7caf1

Please sign in to comment.