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:
@@ -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(
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user