From 2606dbd3623e49c3e8418ee75f12c78361052258 Mon Sep 17 00:00:00 2001 From: ulic75 Date: Mon, 9 May 2022 20:41:10 -0600 Subject: [PATCH] fix: round watts to 1 decimal place (#22) --- src/power-flow-card.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/power-flow-card.ts b/src/power-flow-card.ts index eff63e93..137349b8 100644 --- a/src/power-flow-card.ts +++ b/src/power-flow-card.ts @@ -72,7 +72,7 @@ export class PowerFlowCard extends LitElement { private displayValue = (value: number) => value >= coerceNumber(this._config?.watt_threshold, 0) ? `${roundValue(value / 1000, 1)} kW` - : `${value} W`; + : `${roundValue(value, 1)} W`; protected render(): TemplateResult { if (!this._config || !this.hass) {