1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 04:39:01 +00:00

Fix entity card state display (#5631)

This commit is contained in:
Bram Kragten
2020-04-27 08:48:02 +02:00
committed by GitHub
parent 7c6ba1a782
commit a47c3fa854

View File

@@ -129,6 +129,8 @@ export class HuiEntityCard extends LitElement implements LovelaceCard {
>${"attribute" in this._config
? stateObj.attributes[this._config.attribute!] ||
this.hass.localize("state.default.unknown")
: stateObj.attributes.unit_of_measurement
? stateObj.state
: computeStateDisplay(
this.hass.localize,
stateObj,