Skip to content

Commit

Permalink
fix: detection of grid return (ulic75#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulic75 committed May 3, 2022
1 parent da78757 commit adeee30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/power-distribution-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export class PowerDistributionCard extends LitElement {

const hasBattery = entities.battery !== undefined;
const hasSolarProduction = entities.solar !== undefined;
const hasReturnToGrid = true;
const hasReturnToGrid =
typeof entities.grid === "string" || entities.grid.production;

const batteryChargeState = entities.battery_charge?.length
? this.getEntityState(entities.battery_charge)
Expand Down

0 comments on commit adeee30

Please sign in to comment.