Skip to content

Commit 5686931

Browse files
committed
fix(header): Hide unit when as_duration is used
1 parent 4187104 commit 5686931

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/apexcharts-card.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ class ChartsCard extends LitElement {
336336
? prettyPrintTime(this._lastState?.[index], serie.show.as_duration)
337337
: this._lastState?.[index]) || NO_VALUE}</span
338338
>
339-
<span id="uom">${computeUom(index, this._config, this._entities)}</span>
339+
${!serie.show.as_duration
340+
? html`<span id="uom">${computeUom(index, this._config, this._entities)}</span>`
341+
: ''}
340342
</div>
341343
<div id="state__name">${computeName(index, this._config, this._entities)}</div>
342344
</div>

0 commit comments

Comments
 (0)