mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-02 00:27:49 +01:00
Fix hasReturn check to scan all grid sources in energy view strategy (#30062)
This commit is contained in:
committed by
Bram Kragten
parent
d9d2d6aa03
commit
cfa8eb5370
@@ -59,7 +59,9 @@ export class EnergyViewStrategy extends ReactiveElement {
|
||||
source.type === "grid" &&
|
||||
(!!source.stat_energy_from || !!source.stat_energy_to)
|
||||
);
|
||||
const hasReturn = hasGrid && !!hasGrid.stat_energy_to;
|
||||
const hasReturn = prefs.energy_sources.some(
|
||||
(source) => source.type === "grid" && !!source.stat_energy_to
|
||||
);
|
||||
const hasSolar = prefs.energy_sources.some(
|
||||
(source) => source.type === "solar"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user