Fix device energy card with max_devices (#24150)

This commit is contained in:
Petar Petrov 2025-02-10 11:12:42 +02:00 committed by Bram Kragten
parent 936f66c41c
commit 91e8750f44

View File

@ -447,9 +447,9 @@ export class HuiEnergyDevicesDetailGraphCard
stack: compare ? "devicesCompare" : "devices",
});
});
return sorted_devices.map(
(device) => data.find((d) => (d.id as string).includes(device))!
);
return sorted_devices
.map((device) => data.find((d) => (d.id as string).includes(device))!)
.filter(Boolean);
}
static styles = css`