diff --git a/src/components/entity/ha-statistic-picker.ts b/src/components/entity/ha-statistic-picker.ts index 59c942d95e..8218d2b1a0 100644 --- a/src/components/entity/ha-statistic-picker.ts +++ b/src/components/entity/ha-statistic-picker.ts @@ -30,6 +30,9 @@ export class HaStatisticPicker extends LitElement { @property({ attribute: "statistic-types" }) public statisticTypes?: "mean" | "sum"; + @property({ type: Boolean, attribute: "allow-custom-entity" }) + public allowCustomEntity; + @property({ type: Array }) public statisticIds?: StatisticsMetaData[]; @property({ type: Boolean }) public disabled?: boolean; @@ -245,6 +248,7 @@ export class HaStatisticPicker extends LitElement { .value=${this._value} .renderer=${this._rowRenderer} .disabled=${this.disabled} + .allowCustomValue=${this.allowCustomEntity} item-value-path="id" item-id-path="id" item-label-path="name" diff --git a/src/components/entity/ha-statistics-picker.ts b/src/components/entity/ha-statistics-picker.ts index 797cc1cf9f..1bb9386500 100644 --- a/src/components/entity/ha-statistics-picker.ts +++ b/src/components/entity/ha-statistics-picker.ts @@ -22,6 +22,9 @@ class HaStatisticsPicker extends LitElement { @property({ attribute: "pick-statistic-label" }) public pickStatisticLabel?: string; + @property({ type: Boolean, attribute: "allow-custom-entity" }) + public allowCustomEntity; + /** * Show only statistics natively stored with these units of measurements. * @attr include-statistics-unit-of-measurement @@ -88,6 +91,7 @@ class HaStatisticsPicker extends LitElement { .statisticTypes=${includeStatisticTypesCurrent} .statisticIds=${this.statisticIds} .label=${this.pickedStatisticLabel} + .allowCustomEntity=${this.allowCustomEntity} @value-changed=${this._statisticChanged} > @@ -103,6 +107,7 @@ class HaStatisticsPicker extends LitElement { .statisticTypes=${this.statisticTypes} .statisticIds=${this.statisticIds} .label=${this.pickStatisticLabel} + .allowCustomEntity=${this.allowCustomEntity} @value-changed=${this._addStatistic} > diff --git a/src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts index b1fee485e8..38cd92eab7 100644 --- a/src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts @@ -274,6 +274,7 @@ export class HuiStatisticsGraphCardEditor @value-changed=${this._valueChanged} >