mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-02 00:27:49 +01:00
Fix hasReturnToGrid only checking first grid source in energy distribution card (#30273)
This commit is contained in:
@@ -137,7 +137,8 @@ class HuiEnergyDistrubutionCard
|
||||
const hasBattery = types.battery !== undefined;
|
||||
const hasGas = types.gas !== undefined;
|
||||
const hasWater = types.water !== undefined;
|
||||
const hasReturnToGrid = !!types.grid?.[0] && !!types.grid[0].stat_energy_to;
|
||||
const hasReturnToGrid =
|
||||
types.grid?.some((source) => !!source.stat_energy_to) ?? false;
|
||||
|
||||
const { summedData, compareSummedData: _ } = getSummedData(this._data);
|
||||
const { consumption, compareConsumption: __ } = computeConsumptionData(
|
||||
|
||||
Reference in New Issue
Block a user