Skip to content

Commit

Permalink
Update ha-device-entities-card.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ildar170975 authored Nov 13, 2024
1 parent 5fb9c21 commit 391b07a
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions src/panels/config/devices/device-detail/ha-device-entities-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,28 @@ export class HaDeviceEntitiesCard extends LitElement {
`
: nothing}
${hiddenEntities.length
? html`<div class=${classMap({ "move-up": !shownEntities.length })}>
${!this.showHidden
? html`
<button class="show-more" @click=${this._toggleShowHidden}>
${this.hass.localize(
"ui.panel.config.devices.entities.hidden_entities",
{ count: hiddenEntities.length }
)}
</button>
`
: html`
<mwc-list>
${hiddenEntities.map((entry) => this._renderEntry(entry))}
</mwc-list>
<button class="show-more" @click=${this._toggleShowHidden}>
${this.hass.localize(
"ui.panel.config.devices.entities.show_less"
)}
</button>
`
}
</div>`
: nothing}
? html`<div class=${classMap({ "move-up": !shownEntities.length })}>
${!this.showHidden
? html`
<button class="show-more" @click=${this._toggleShowHidden}>
${this.hass.localize(
"ui.panel.config.devices.entities.hidden_entities",
{ count: hiddenEntities.length }
)}
</button>
`
: html`
<mwc-list>
${hiddenEntities.map((entry) => this._renderEntry(entry))}
</mwc-list>
<button class="show-more" @click=${this._toggleShowHidden}>
${this.hass.localize(
"ui.panel.config.devices.entities.show_less"
)}
</button>
`}
</div>`
: nothing}
<div class="card-actions">
<mwc-button @click=${this._addToLovelaceView}>
${this.hass.localize(
Expand Down

0 comments on commit 391b07a

Please sign in to comment.