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 GitHub
parent b0b06a2787
commit 497c6c35f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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`