From f4e583b302f44fbfe820ca4038ff451fcd874722 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:54:54 -0700 Subject: [PATCH] Don't hide empty entity-filter card in edit mode (#27119) --- src/panels/lovelace/cards/hui-entity-filter-card.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/panels/lovelace/cards/hui-entity-filter-card.ts b/src/panels/lovelace/cards/hui-entity-filter-card.ts index 5e8ed06d6f..17fb7055ea 100644 --- a/src/panels/lovelace/cards/hui-entity-filter-card.ts +++ b/src/panels/lovelace/cards/hui-entity-filter-card.ts @@ -143,8 +143,7 @@ export class HuiEntityFilterCard this._element.preview = this.preview; this._element.layout = this.layout; } - - if (changedProps.has("_config")) { + if (changedProps.has("_config") || changedProps.has("preview")) { return true; } if (changedProps.has("hass")) { @@ -186,7 +185,11 @@ export class HuiEntityFilterCard return true; }); - if (entitiesList.length === 0 && this._config.show_empty === false) { + if ( + entitiesList.length === 0 && + this._config.show_empty === false && + !this.preview + ) { if (!this.hidden) { this.style.display = "none"; this.toggleAttribute("hidden", true);