From 6861c64a897e9e185294d317836b9a7b3da43190 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Tue, 29 Oct 2024 02:32:45 +0300 Subject: [PATCH 1/4] Update ha-device-entities-card.ts --- .../device-detail/ha-device-entities-card.ts | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/panels/config/devices/device-detail/ha-device-entities-card.ts b/src/panels/config/devices/device-detail/ha-device-entities-card.ts index 71a8b0acdf12..8b4f26118d15 100644 --- a/src/panels/config/devices/device-detail/ha-device-entities-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-entities-card.ts @@ -92,15 +92,19 @@ export class HaDeviceEntitiesCard extends LitElement { return html` -
- - ${shownEntities.map((entry) => - this.hass.states[entry.entity_id] - ? this._renderEntity(entry) - : this._renderEntry(entry) - )} - -
+ ${shownEntities.length + ? html` +
+ + ${shownEntities.map((entry) => + this.hass.states[entry.entity_id] + ? this._renderEntity(entry) + : this._renderEntry(entry) + )} + +
+ ` + : ""} ${hiddenEntities.length ? !this.showHidden ? html` @@ -302,6 +306,10 @@ export class HaDeviceEntitiesCard extends LitElement { outline: none; text-decoration: underline; } + mwc-list:has(.disabled-entry) { + --mdc-list-vertical-padding: 0; + margin-top: -8px; + } `; } } From ab398b45ebacc07e079302386afec486508011a0 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Tue, 29 Oct 2024 03:09:51 +0300 Subject: [PATCH 2/4] Update ha-device-entities-card.ts --- .../config/devices/device-detail/ha-device-entities-card.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panels/config/devices/device-detail/ha-device-entities-card.ts b/src/panels/config/devices/device-detail/ha-device-entities-card.ts index 8b4f26118d15..e97774dab243 100644 --- a/src/panels/config/devices/device-detail/ha-device-entities-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-entities-card.ts @@ -310,6 +310,9 @@ export class HaDeviceEntitiesCard extends LitElement { --mdc-list-vertical-padding: 0; margin-top: -8px; } + #entities + mwc-list:has(.disabled-entry) { + margin-top: 8px; + } `; } } From 4cfc43075efae95b204af11e9fe5b910116aeb12 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:55:33 +0300 Subject: [PATCH 3/4] Update src/panels/config/devices/device-detail/ha-device-entities-card.ts Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com> --- .../config/devices/device-detail/ha-device-entities-card.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/config/devices/device-detail/ha-device-entities-card.ts b/src/panels/config/devices/device-detail/ha-device-entities-card.ts index e97774dab243..7beceaf2698a 100644 --- a/src/panels/config/devices/device-detail/ha-device-entities-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-entities-card.ts @@ -104,7 +104,7 @@ export class HaDeviceEntitiesCard extends LitElement { ` - : ""} + : nothing} ${hiddenEntities.length ? !this.showHidden ? html` From 7a3f86403e0d4cdb8bd1a320618e8266533be429 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:57:51 +0300 Subject: [PATCH 4/4] Update ha-device-entities-card.ts --- .../config/devices/device-detail/ha-device-entities-card.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panels/config/devices/device-detail/ha-device-entities-card.ts b/src/panels/config/devices/device-detail/ha-device-entities-card.ts index 7beceaf2698a..b61cec3fd0d7 100644 --- a/src/panels/config/devices/device-detail/ha-device-entities-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-entities-card.ts @@ -6,6 +6,7 @@ import { LitElement, PropertyValues, TemplateResult, + nothing } from "lit"; import { customElement, property, state } from "lit/decorators"; import { until } from "lit/directives/until"; @@ -125,7 +126,7 @@ export class HaDeviceEntitiesCard extends LitElement { )} ` - : ""} + : nothing}
${this.hass.localize(