From a221db107c5848e68c462006b3f08345513ba3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20F=C3=A9lix?= Date: Thu, 13 Apr 2023 12:33:15 +0200 Subject: [PATCH] bug: fixed where state of secondary info for individual devices didn't get rendered correctly --- src/power-flow-card-plus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/power-flow-card-plus.ts b/src/power-flow-card-plus.ts index 5394876..ead65d9 100644 --- a/src/power-flow-card-plus.ts +++ b/src/power-flow-card-plus.ts @@ -137,7 +137,7 @@ class PowerFlowCardPlus extends LitElement { private displayValue = (value: number | string | null, unit?: string | undefined, unitWhiteSpace?: boolean | undefined) => { if (value === null) return "0"; - if (Number.isNaN(value)) return value; + if (Number.isNaN(+value)) return value; const valueInNumber = Number(value); const isKW = unit === undefined && valueInNumber >= this._config!.watt_threshold; const v = formatNumber(