From fe8eb333b97aeb9a08828c05eb4d85814449d551 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 5 Jun 2023 17:23:28 +0200 Subject: [PATCH] Limit integration card to 1 action row (#16780) --- .../config/integrations/ha-integration-card.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/panels/config/integrations/ha-integration-card.ts b/src/panels/config/integrations/ha-integration-card.ts index 28621b5e63..a0e1aae130 100644 --- a/src/panels/config/integrations/ha-integration-card.ts +++ b/src/panels/config/integrations/ha-integration-card.ts @@ -95,7 +95,9 @@ export class HaIntegrationCard extends LitElement { private _renderSingleEntry(): TemplateResult { const devices = this._getDevices(this.items, this.hass.devices); - const entities = this._getEntities(this.items, this.entityRegistryEntries); + const entities = devices.length + ? [] + : this._getEntities(this.items, this.entityRegistryEntries); const services = !devices.some((device) => device.entry_type !== "service"); @@ -122,8 +124,7 @@ export class HaIntegrationCard extends LitElement { ` - : ""} - ${entities.length > 0 + : entities.length > 0 ? html` @@ -140,9 +141,7 @@ export class HaIntegrationCard extends LitElement { ` - : ""} - ${devices.length === 0 && entities.length === 0 - ? html` + : html` - ` - : ""} + `} `; }