From c51535eb790d9d35fa6f593f565604c2d380f7f3 Mon Sep 17 00:00:00 2001 From: Tom Carpenter Date: Sat, 14 Mar 2026 07:16:39 +0000 Subject: [PATCH] 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. --- src/components/entity/ha-statistic-picker.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/components/entity/ha-statistic-picker.ts b/src/components/entity/ha-statistic-picker.ts index 3ae43f8455..806322b2e2 100644 --- a/src/components/entity/ha-statistic-picker.ts +++ b/src/components/entity/ha-statistic-picker.ts @@ -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( (