From 56869316476d7d64abb6045e1d40e854300c0836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Wiedemann?= Date: Sat, 30 Jan 2021 10:45:10 +0000 Subject: [PATCH] fix(header): Hide unit when `as_duration` is used --- src/apexcharts-card.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apexcharts-card.ts b/src/apexcharts-card.ts index 1b81d92..3df5d1a 100644 --- a/src/apexcharts-card.ts +++ b/src/apexcharts-card.ts @@ -336,7 +336,9 @@ class ChartsCard extends LitElement { ? prettyPrintTime(this._lastState?.[index], serie.show.as_duration) : this._lastState?.[index]) || NO_VALUE} - ${computeUom(index, this._config, this._entities)} + ${!serie.show.as_duration + ? html`${computeUom(index, this._config, this._entities)}` + : ''}
${computeName(index, this._config, this._entities)}