Skip to content

Commit

Permalink
fix: dynamic colour for load icon when grid power === 0 and productio…
Browse files Browse the repository at this point in the history
…n<consumption closes #568
  • Loading branch information
slipx06 committed Dec 2, 2024
1 parent b8f61b6 commit 118cdbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down

0 comments on commit 118cdbf

Please sign in to comment.