From b9a7a7c422b0a48c668b1636b515420759b38ba3 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 80e517d5ce..89b2dac01c 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} `; }