Skip to content

Commit

Permalink
Don't suggest to pick another card for sections (#19977)
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Mar 4, 2024
1 parent a9f453e commit 63d93f2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -154,7 +158,7 @@ export class HuiDialogSuggestCard extends LitElement {
)}
</mwc-button>
`
: ""}
: nothing}
</ha-dialog>
`;
}
Expand Down

0 comments on commit 63d93f2

Please sign in to comment.