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

Fix Statistic Entity Picker showing no entities/uncaught exception (#30144)

Correct Statistic Picker _getAdditionalItems

This should be a lambda function saved to a property, not a method. Otherwise when called  the "this" is the caller not the statistic picker. This was causing the Statistic Card entity picker to load blank.
This commit is contained in:
Tom Carpenter
2026-03-14 07:16:39 +00:00
committed by GitHub
parent 5ea05768a3
commit c51535eb79

View File

@@ -156,17 +156,15 @@ export class HaStatisticPicker extends LitElement {
this.value
);
private _getAdditionalItems(): StatisticComboBoxItem[] {
return [
{
id: MISSING_ID,
primary: this.hass.localize(
"ui.components.statistic-picker.missing_entity"
),
icon_path: mdiHelpCircleOutline,
},
];
}
private _getAdditionalItems = (): StatisticComboBoxItem[] => [
{
id: MISSING_ID,
primary: this.hass.localize(
"ui.components.statistic-picker.missing_entity"
),
icon_path: mdiHelpCircleOutline,
},
];
private _getStatisticsItems = memoizeOne(
(