diff --git a/src/panels/lovelace/cards/hui-entity-card.ts b/src/panels/lovelace/cards/hui-entity-card.ts index bd14259143..d4b26bbecc 100644 --- a/src/panels/lovelace/cards/hui-entity-card.ts +++ b/src/panels/lovelace/cards/hui-entity-card.ts @@ -165,15 +165,13 @@ export class HuiEntityCard extends LitElement implements LovelaceCard { ${"attribute" in this._config ? stateObj.attributes[this._config.attribute!] !== undefined - ? html` - - - ` + ? html` + ` : this.hass.localize("state.default.unknown") : (isNumericState(stateObj) || this._config.unit) && stateObj.attributes.device_class !== "duration"