From a6452bbf357508f8cfc0c9709ee0122b7b48be33 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 25 Jun 2025 21:20:10 +0000 Subject: [PATCH] Hide devices without subentry box when not needed --- .../integrations/ha-config-entry-row.ts | 87 ++++++++++--------- 1 file changed, 47 insertions(+), 40 deletions(-) diff --git a/src/panels/config/integrations/ha-config-entry-row.ts b/src/panels/config/integrations/ha-config-entry-row.ts index 2d1c80a3fe..ed88ae92b1 100644 --- a/src/panels/config/integrations/ha-config-entry-row.ts +++ b/src/panels/config/integrations/ha-config-entry-row.ts @@ -405,47 +405,54 @@ class HaConfigEntryRow extends LitElement { ${this._expanded ? subEntries.length - ? html` - - - - ${this.hass.localize( - "ui.panel.config.integrations.config_entry.devices_without_subentry" - )} - - ${this._devicesExpanded - ? ownDevices.map( - (device) => - html`` - ) - : nothing} - - ${subEntries.map( - (subEntry) => html` - + ? html` ${ownDevices.length + ? html` + + + + + ${this.hass.localize( + "ui.panel.config.integrations.config_entry.devices_without_subentry" + )} + + ${this._devicesExpanded + ? ownDevices.map( + (device) => + html`` + ) + : nothing} + ` - )}` + : nothing} + ${subEntries.map( + (subEntry) => html` + + ` + )}` : html` ${ownDevices.map( (device) =>