Don't suggest to pick another card for sections (#19977)

This commit is contained in:
Paul Bottein 2024-03-04 15:30:31 +01:00 committed by GitHub
parent 88ccbcd883
commit b9a7a7c422
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,11 +131,15 @@ export class HuiDialogSuggestCard extends LitElement {
</mwc-button>
${!this._params.yaml
? html`
<mwc-button slot="primaryAction" @click=${this._pickCard}
>${this.hass!.localize(
"ui.panel.lovelace.editor.suggest_card.create_own"
)}</mwc-button
>
${!(this._sectionConfig && this._viewSupportsSection)
? html`
<mwc-button slot="primaryAction" @click=${this._pickCard}>
${this.hass!.localize(
"ui.panel.lovelace.editor.suggest_card.create_own"
)}
</mwc-button>
`
: nothing}
<mwc-button
slot="primaryAction"
.disabled=${this._saving}
@ -154,7 +158,7 @@ export class HuiDialogSuggestCard extends LitElement {
)}
</mwc-button>
`
: ""}
: nothing}
</ha-dialog>
`;
}