1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Entity card: remove whitespaces in span (#28562)

This commit is contained in:
ildar170975
2025-12-16 10:18:13 +03:00
committed by GitHub
parent b3d7c0b6dc
commit ca06269a91

View File

@@ -165,15 +165,13 @@ export class HuiEntityCard extends LitElement implements LovelaceCard {
<span class="value" <span class="value"
>${"attribute" in this._config >${"attribute" in this._config
? stateObj.attributes[this._config.attribute!] !== undefined ? stateObj.attributes[this._config.attribute!] !== undefined
? html` ? html`<ha-attribute-value
<ha-attribute-value hide-unit
hide-unit .hass=${this.hass}
.hass=${this.hass} .stateObj=${stateObj}
.stateObj=${stateObj} .attribute=${this._config.attribute!}
.attribute=${this._config.attribute!} >
> </ha-attribute-value>`
</ha-attribute-value>
`
: this.hass.localize("state.default.unknown") : this.hass.localize("state.default.unknown")
: (isNumericState(stateObj) || this._config.unit) && : (isNumericState(stateObj) || this._config.unit) &&
stateObj.attributes.device_class !== "duration" stateObj.attributes.device_class !== "duration"