From b3216de2500cf16f55e2c4bd3eb58f2a2f624392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20F=C3=A9lix?= Date: Sat, 27 Apr 2024 07:31:03 +0200 Subject: [PATCH] fix: :bug: soc unit whitespace --- src/power-flow-card-plus.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/power-flow-card-plus.ts b/src/power-flow-card-plus.ts index ea67aa6..104c202 100644 --- a/src/power-flow-card-plus.ts +++ b/src/power-flow-card-plus.ts @@ -232,8 +232,8 @@ export class PowerFlowCardPlus extends LitElement { icon: computeFieldIcon(this.hass, entities.battery, "mdi:battery-high"), state_of_charge: { state: getBatteryStateOfCharge(this.hass, this._config), - unit: entities?.battery?.state_of_charge_unit || "%", - unit_white_space: entities?.battery?.state_of_charge_unit_white_space || true, + unit: entities?.battery?.state_of_charge_unit ?? "%", + unit_white_space: entities?.battery?.state_of_charge_unit_white_space ?? true, decimals: entities?.battery?.state_of_charge_decimals || 0, }, state: {