diff --git a/package.json b/package.json index a70d9ff0..6e9142a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sunsynk-power-flow-card", - "version": "6.1.3", + "version": "6.1.4", "description": "A customizable Home Assistant card to emulate the Sunsynk System flow that's displayed on the Inverter screen.", "main": "sunsynk-power-flow-card.js", "scripts": { diff --git a/src/index.ts b/src/index.ts index 2fa0a184..64aa018d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1185,7 +1185,7 @@ export class SunsynkPowerFlowCard extends LitElement { } else { pvPercentage = Utils.toNum(Math.min(pvPercentageRaw, 100), 0); batteryPercentage = Utils.toNum(Math.min(batteryPercentageRaw, 100), 0); - gridPercentage = 100 - (pvPercentage + batteryPercentage); + gridPercentage = totalGridPower > 0 ? 100 - (pvPercentage + batteryPercentage) : 0; } //console.log(`${pvPercentage} % PVPercentage, ${batteryPercentage} % BatteryPercentage, ${gridPercentage} % GridPercentage`);