From 51ca3e277c081f92918fcc6ed63e59c85cc496cd Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Sat, 26 Apr 2025 18:27:15 +0200 Subject: [PATCH] Fix wrong label selected when filtering labels (#25180) Fix filtered labels --- src/components/ha-filter-labels.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/ha-filter-labels.ts b/src/components/ha-filter-labels.ts index 0d998ad85c..0e006c85de 100644 --- a/src/components/ha-filter-labels.ts +++ b/src/components/ha-filter-labels.ts @@ -174,9 +174,14 @@ export class HaFilterLabels extends SubscribeMixin(LitElement) { } const value: string[] = []; + const filteredLabels = this._filteredLabels( + this._labels, + this._filter, + this.value + ); for (const index of ev.detail.index) { - const labelId = this._labels[index].label_id; + const labelId = filteredLabels[index].label_id; value.push(labelId); } this.value = value;