Fix entity card state display (#5631)
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user