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/9] 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/9] 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/9] 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/9] 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( From 94a47db3b79c3cec8856df31c955e6759f284d88 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:00:19 +0300 Subject: [PATCH 5/9] 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 521af984069b..7c3846ebdb6b 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 @@ -95,7 +95,7 @@ export class HaDeviceEntitiesCard extends LitElement { ${shownEntities.length ? html` -
+
${shownEntities.map((entry) => this.hass.states[entry.entity_id] From b9de5c4456c658d5f452adf232fa2b44cf2a06e7 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:05:59 +0300 Subject: [PATCH 6/9] Update ha-device-entities-card.ts --- .../device-detail/ha-device-entities-card.ts | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 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 7c3846ebdb6b..d210e177f118 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 @@ -107,26 +107,29 @@ export class HaDeviceEntitiesCard extends LitElement { ` : nothing} ${hiddenEntities.length - ? !this.showHidden - ? html` - - ` - : html` - - ${hiddenEntities.map((entry) => this._renderEntry(entry))} - - - ` - : nothing} + ? html`
+ ${!this.showHidden + ? html` + + ` + : html` + + ${hiddenEntities.map((entry) => this._renderEntry(entry))} + + + ` + } +
` + : nothing}
${this.hass.localize( @@ -268,8 +271,8 @@ export class HaDeviceEntitiesCard extends LitElement { .disabled-entry { color: var(--secondary-text-color); } - #entities { - margin-top: -24px; /* match the spacing between card title and content of the device info card above it */ + .move-up { + margin-top: -24px; } #entities > * { margin: 8px 16px 8px 8px; From 86956c87f16f3846c19722f0fa75be648cdcadd0 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:18:51 +0300 Subject: [PATCH 7/9] Update src/panels/config/devices/device-detail/ha-device-entities-card.ts Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com> --- .../devices/device-detail/ha-device-entities-card.ts | 7 ------- 1 file changed, 7 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 d210e177f118..476b4827731b 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 @@ -311,13 +311,6 @@ export class HaDeviceEntitiesCard extends LitElement { outline: none; text-decoration: underline; } - mwc-list:has(.disabled-entry) { - --mdc-list-vertical-padding: 0; - margin-top: -8px; - } - #entities + mwc-list:has(.disabled-entry) { - margin-top: 8px; - } ha-list-item { height: 40px; } From 8e452ba465988d4ec0a0348af2c40259b2b69637 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:03:47 +0300 Subject: [PATCH 8/9] Update ha-device-entities-card.ts --- .../config/devices/device-detail/ha-device-entities-card.ts | 1 + 1 file changed, 1 insertion(+) 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 476b4827731b..ae2ffc7a4a9e 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 @@ -9,6 +9,7 @@ import { nothing } from "lit"; import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { until } from "lit/directives/until"; import { computeStateName } from "../../../../common/entity/compute_state_name"; import { stripPrefixFromEntityName } from "../../../../common/entity/strip_prefix_from_entity_name"; From 391b07a3f407f3eaf7af398ea611ce7ac0babc78 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Wed, 13 Nov 2024 03:47:29 +0300 Subject: [PATCH 9/9] Update ha-device-entities-card.ts --- .../device-detail/ha-device-entities-card.ts | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 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 f3862486f163..f54db76e0d75 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 @@ -101,29 +101,28 @@ export class HaDeviceEntitiesCard extends LitElement { ` : nothing} ${hiddenEntities.length - ? html`
- ${!this.showHidden - ? html` - - ` - : html` - - ${hiddenEntities.map((entry) => this._renderEntry(entry))} - - - ` - } -
` - : nothing} + ? html`
+ ${!this.showHidden + ? html` + + ` + : html` + + ${hiddenEntities.map((entry) => this._renderEntry(entry))} + + + `} +
` + : nothing}
${this.hass.localize(