1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Fix energy pie chart legend showing raw data instead of formatted values (#30339)

This commit is contained in:
Petar Petrov
2026-03-26 15:29:16 +01:00
committed by Bram Kragten
parent 640558ad35
commit be1921229c

View File

@@ -542,6 +542,7 @@ export class HuiEnergyDevicesGraphCard
this._legendData = chartData.map((d) => ({
...d,
name: this._getDeviceName(d.name),
value: `${formatNumber(d.value[0], this.hass.locale)} kWh`,
}));
// filter out hidden stats in place
for (let i = chartData.length - 1; i >= 0; i--) {