diff --git a/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts index 90dec57607..c4a9891ad4 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts @@ -88,16 +88,18 @@ export class HuiEnergyGasGraphCard return html` -
- ${this._config.title ? this._config.title : nothing} - ${this._total - ? html` - ${formatNumber(this._total, this.hass.locale)} ${this._unit} - ` - : nothing} -
+ ${this._config.title + ? html`
+ ${this._config.title} + ${this._total + ? html` + ${formatNumber(this._total, this.hass.locale)} ${this._unit} + ` + : nothing} +
` + : nothing}
-
- ${this._config.title ? this._config.title : nothing} - ${this._total - ? html` - ${formatNumber(this._total, this.hass.locale)} kWh - ` - : nothing} -
+ ${this._config.title + ? html`
+ ${this._config.title} + ${this._total + ? html` + ${formatNumber(this._total, this.hass.locale)} kWh + ` + : nothing} +
` + : nothing}
-
- ${this._config.title ? this._config.title : nothing} - ${this._total - ? html` - ${this.hass.localize( - "ui.panel.lovelace.cards.energy.energy_usage_graph.total_usage", - { num: formatNumber(this._total, this.hass.locale) } - )} - ` - : nothing} -
+ ${this._config.title + ? html`
+ ${this._config.title} + ${this._total + ? html` + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_usage_graph.total_usage", + { num: formatNumber(this._total, this.hass.locale) } + )} + ` + : nothing} +
` + : nothing}
-
- ${this._config.title ? this._config.title : nothing} - ${this._total - ? html` - ${formatNumber(this._total, this.hass.locale)} ${this._unit} - ` - : nothing} -
+ ${this._config.title + ? html`
+ ${this._config.title ? this._config.title : nothing} + ${this._total + ? html` + ${formatNumber(this._total, this.hass.locale)} ${this._unit} + ` + : nothing} +
` + : nothing}