mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 06:46:35 +00:00
Fix entity card state display (#5631)
This commit is contained in:
parent
7c6ba1a782
commit
a47c3fa854
@ -129,6 +129,8 @@ export class HuiEntityCard extends LitElement implements LovelaceCard {
|
|||||||
>${"attribute" in this._config
|
>${"attribute" in this._config
|
||||||
? stateObj.attributes[this._config.attribute!] ||
|
? stateObj.attributes[this._config.attribute!] ||
|
||||||
this.hass.localize("state.default.unknown")
|
this.hass.localize("state.default.unknown")
|
||||||
|
: stateObj.attributes.unit_of_measurement
|
||||||
|
? stateObj.state
|
||||||
: computeStateDisplay(
|
: computeStateDisplay(
|
||||||
this.hass.localize,
|
this.hass.localize,
|
||||||
stateObj,
|
stateObj,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user