From bff21d451c33e196084c848b1f813c77f7724228 Mon Sep 17 00:00:00 2001 From: Ola Thoresen Date: Wed, 3 Jan 2024 20:36:55 +0100 Subject: [PATCH] Add types 2 --- src/utils/attributes.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/attributes.ts b/src/utils/attributes.ts index 92f5ee2..da9e54e 100644 --- a/src/utils/attributes.ts +++ b/src/utils/attributes.ts @@ -51,9 +51,9 @@ export const renderAttributes = (card: FlowerCard): TemplateResult[] => { const result = card.plantinfo.result; for (const elem of monitored) { if (result[elem]) { - const { max: number, min: number, current: number, icon: string, sensor: string, unit_of_measurement: string } = result[elem]; - limits[`max_${elem}`] = { max, min }; - curr[elem] = current; + const { max, min, current, icon, sensor, unit_of_measurement } = result[elem]; + limits[`max_${elem}`] = { Number(max), Number(min) }; + curr[elem] = Number(current); icons[elem] = icon; sensors[elem] = sensor; uomt[elem] = unit_of_measurement;