From 63d93f2a36e29096c9955ce368a2957f9091bf6f Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 4 Mar 2024 15:30:31 +0100 Subject: [PATCH] Don't suggest to pick another card for sections (#19977) --- .../card-editor/hui-dialog-suggest-card.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts index 80e517d5ceae..89b2dac01ca9 100644 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts @@ -131,11 +131,15 @@ export class HuiDialogSuggestCard extends LitElement { ${!this._params.yaml ? html` - ${this.hass!.localize( - "ui.panel.lovelace.editor.suggest_card.create_own" - )} + ${!(this._sectionConfig && this._viewSupportsSection) + ? html` + + ${this.hass!.localize( + "ui.panel.lovelace.editor.suggest_card.create_own" + )} + + ` + : nothing} ` - : ""} + : nothing} `; }