Skip to content
15 changes: 15 additions & 0 deletions src/panels/energy/strategies/energy-view-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@ export class EnergyViewStrategy extends ReactiveElement {
});
}

// Only include if we have both grid import and export configured
if (hasGrid && hasReturn) {
const gridResultCard = {
type: "energy-grid-balance",
collection_key: collectionKey,
};
sidebarSection.cards!.push(gridResultCard);
view.sections!.push({
type: "grid",
column_span: 1,
visibility: [SMALL_SCREEN_CONDITION],
cards: [gridResultCard],
});
}

// Only include if we have a grid source & return.
if (hasReturn) {
const card = {
Expand Down
Loading
Loading