From f3449c4d9b772008436960ea18b421de1a60d2ac Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 5 Sep 2022 19:00:54 +0200 Subject: [PATCH] Add description to automation editor (#13603) --- .../config/automation/blueprint-automation-editor.ts | 6 ++++++ src/panels/config/automation/ha-automation-editor.ts | 2 +- src/panels/config/automation/manual-automation-editor.ts | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/panels/config/automation/blueprint-automation-editor.ts b/src/panels/config/automation/blueprint-automation-editor.ts index 069376c4ba..cb69701510 100644 --- a/src/panels/config/automation/blueprint-automation-editor.ts +++ b/src/panels/config/automation/blueprint-automation-editor.ts @@ -64,6 +64,9 @@ export class HaBlueprintAutomationEditor extends LitElement { ` : ""} + ${this.config.description + ? html`

${this.config.description}

` + : ""} { const id = this.automationId || String(Date.now()); - if (!this._config!.alias) { + if (!this.automationId) { await this._promptAutomationAlias(); if (!this._config!.alias) { showAlertDialog(this, { diff --git a/src/panels/config/automation/manual-automation-editor.ts b/src/panels/config/automation/manual-automation-editor.ts index 340b9e33eb..ebe14f3e1d 100644 --- a/src/panels/config/automation/manual-automation-editor.ts +++ b/src/panels/config/automation/manual-automation-editor.ts @@ -73,6 +73,9 @@ export class HaManualAutomationEditor extends LitElement { ` : ""} + ${this.config.description + ? html`

${this.config.description}

` + : ""}

${this.hass.localize( @@ -215,7 +218,9 @@ export class HaManualAutomationEditor extends LitElement { .link-button-row { padding: 14px; } - + .description { + margin: 0; + } p { margin-bottom: 0; }