mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Fix default formatEntityState function (#17852)
This commit is contained in:
parent
7176a51fec
commit
db7caf1c32
@ -177,10 +177,10 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
this._loadFragmentTranslations(this.hass?.language, fragment),
|
this._loadFragmentTranslations(this.hass?.language, fragment),
|
||||||
formatEntityState: (stateObj, state) =>
|
formatEntityState: (stateObj, state) =>
|
||||||
(state !== null ? state : stateObj.state) ?? "",
|
(state != null ? state : stateObj.state) ?? "",
|
||||||
formatEntityAttributeName: (_stateObj, attribute) => attribute,
|
formatEntityAttributeName: (_stateObj, attribute) => attribute,
|
||||||
formatEntityAttributeValue: (stateObj, attribute, value) =>
|
formatEntityAttributeValue: (stateObj, attribute, value) =>
|
||||||
value !== null ? value : stateObj.attributes[attribute] ?? "",
|
value != null ? value : stateObj.attributes[attribute] ?? "",
|
||||||
...getState(),
|
...getState(),
|
||||||
...this._pendingHass,
|
...this._pendingHass,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user