From 988486343a1c08e4d4770bde2ca4d59751264e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20F=C3=A9lix?= Date: Sun, 21 Apr 2024 17:03:17 +0200 Subject: [PATCH] fix: :bug: decimal values not in individual --- src/power-flow-card-plus.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/power-flow-card-plus.ts b/src/power-flow-card-plus.ts index fd36d0c..ea67aa6 100644 --- a/src/power-flow-card-plus.ts +++ b/src/power-flow-card-plus.ts @@ -481,14 +481,13 @@ export class PowerFlowCardPlus extends LitElement { }, }; - /* return source object with largest value property */ const homeLargestSource = Object.keys(homeSources).reduce((a, b) => (homeSources[a].value > homeSources[b].value ? a : b)); const getIndividualDisplayState = (field?: IndividualObject) => { if (!field) return ""; if (field?.state === undefined) return ""; - // return displayValue(this.hass, field?.state, field?.unit, field?.unit_white_space, field?.decimals); return displayValue(this.hass, this._config, field?.state, { + decimals: field?.decimals, unit: field?.unit, unitWhiteSpace: field?.unit_white_space, watt_threshold: this._config.watt_threshold,