From 3532cfa97474a0a41cd7ccceec9092cea80bd9ec Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 26 May 2025 19:21:44 +0200 Subject: [PATCH] Fix duplicated items in strategy editor (#25600) --- src/components/ha-items-display-editor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ha-items-display-editor.ts b/src/components/ha-items-display-editor.ts index 77e1dfff35..e87ecfaef0 100644 --- a/src/components/ha-items-display-editor.ts +++ b/src/components/ha-items-display-editor.ts @@ -262,7 +262,7 @@ export class HaItemDisplayEditor extends LitElement { ]; } - return items.sort((a, b) => + return visibleItems.sort((a, b) => a.disableSorting && !b.disableSorting ? -1 : compare(a.value, b.value) ); }