mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Limit integration card to 1 action row (#16780)
This commit is contained in:
parent
677cd2de10
commit
fe8eb333b9
@ -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 {
|
||||
<ha-icon-next slot="meta"></ha-icon-next>
|
||||
</ha-list-item>
|
||||
</a>`
|
||||
: ""}
|
||||
${entities.length > 0
|
||||
: entities.length > 0
|
||||
? html`<a
|
||||
href=${`/config/entities?historyBack=1&domain=${this.domain}`}
|
||||
>
|
||||
@ -140,9 +141,7 @@ export class HaIntegrationCard extends LitElement {
|
||||
<ha-icon-next slot="meta"></ha-icon-next>
|
||||
</ha-list-item>
|
||||
</a>`
|
||||
: ""}
|
||||
${devices.length === 0 && entities.length === 0
|
||||
? html`<a href=${`/config/integrations/integration/${this.domain}`}>
|
||||
: html`<a href=${`/config/integrations/integration/${this.domain}`}>
|
||||
<ha-list-item hasMeta graphic="icon">
|
||||
<ha-svg-icon
|
||||
.path=${mdiPuzzleOutline}
|
||||
@ -155,8 +154,7 @@ export class HaIntegrationCard extends LitElement {
|
||||
)}
|
||||
<ha-icon-next slot="meta"></ha-icon-next>
|
||||
</ha-list-item>
|
||||
</a>`
|
||||
: ""}
|
||||
</a>`}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user