Fix untracked energy rendering at the base of the bar stack (#24288)

This commit is contained in:
karwosts 2025-02-17 21:36:53 -08:00 committed by GitHub
parent 4546c6f624
commit cdd17eed2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -327,7 +327,9 @@ export class HuiEnergyDevicesDetailGraphCard
);
const untrackedConsumption: BarSeriesOption["data"] = [];
Object.keys(consumptionData.total).forEach((time) => {
Object.keys(consumptionData.total)
.sort((a, b) => Number(a) - Number(b))
.forEach((time) => {
const ts = Number(time);
const value =
consumptionData.total[time] - (totalDeviceConsumption[time] || 0);