From 3ecd1b5e2256e559e5129fcf46c98feff22b5e83 Mon Sep 17 00:00:00 2001 From: Dave T <17680170+davet2001@users.noreply.github.com> Date: Tue, 29 Oct 2024 23:46:06 +0000 Subject: [PATCH] Use 1dp for energy flow labels --- src/ha-elec-sankey.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ha-elec-sankey.ts b/src/ha-elec-sankey.ts index b7faebd..66fb209 100644 --- a/src/ha-elec-sankey.ts +++ b/src/ha-elec-sankey.ts @@ -39,6 +39,7 @@ export class HaElecSankey extends ElecSankey { valueB: number | undefined ): TemplateResult { const _id = id || ""; + const numFractionDigits = this.unit === "kWh" ? 1 : 0; return html`