mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +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
|
||||
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,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user