From 5751489e03a99491a203685d2f83639ec39e869d Mon Sep 17 00:00:00 2001 From: karwosts Date: Sat, 11 May 2024 13:53:27 -0700 Subject: [PATCH] descriptions in blueprints also --- .../automation/blueprint-automation-editor.ts | 13 +++++++++---- src/panels/config/script/blueprint-script-editor.ts | 13 +++++++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/panels/config/automation/blueprint-automation-editor.ts b/src/panels/config/automation/blueprint-automation-editor.ts index 2ff983d4c059..83a7c7bb991a 100644 --- a/src/panels/config/automation/blueprint-automation-editor.ts +++ b/src/panels/config/automation/blueprint-automation-editor.ts @@ -1,11 +1,12 @@ import "@material/mwc-button/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { html } from "lit"; +import { html, nothing } from "lit"; import { customElement, property } from "lit/decorators"; import "../../../components/ha-alert"; import { BlueprintAutomationConfig } from "../../../data/automation"; import { fetchBlueprints } from "../../../data/blueprint"; import { HaBlueprintGenericEditor } from "../blueprint/blueprint-generic-editor"; +import "../../../components/ha-markdown"; @customElement("blueprint-automation-editor") export class HaBlueprintAutomationEditor extends HaBlueprintGenericEditor { @@ -26,7 +27,7 @@ export class HaBlueprintAutomationEditor extends HaBlueprintGenericEditor { ${this.hass.localize("ui.panel.config.automation.editor.migrate")} ` - : ""} + : nothing} ${this.stateObj?.state === "off" ? html` @@ -42,8 +43,12 @@ export class HaBlueprintAutomationEditor extends HaBlueprintGenericEditor { ` : ""} ${this.config.description - ? html`

${this.config.description}

` - : ""} + ? html`` + : nothing} ${this.renderCard()} `; } diff --git a/src/panels/config/script/blueprint-script-editor.ts b/src/panels/config/script/blueprint-script-editor.ts index c233eae66245..ba388f5e0d75 100644 --- a/src/panels/config/script/blueprint-script-editor.ts +++ b/src/panels/config/script/blueprint-script-editor.ts @@ -1,9 +1,11 @@ -import { html } from "lit"; +import "@material/mwc-button/mwc-button"; +import { html, nothing } from "lit"; import { customElement, property } from "lit/decorators"; import "../../../components/ha-alert"; import { BlueprintScriptConfig } from "../../../data/script"; import { fetchBlueprints } from "../../../data/blueprint"; import { HaBlueprintGenericEditor } from "../blueprint/blueprint-generic-editor"; +import "../../../components/ha-markdown"; @customElement("blueprint-script-editor") export class HaBlueprintScriptEditor extends HaBlueprintGenericEditor { @@ -22,7 +24,14 @@ export class HaBlueprintScriptEditor extends HaBlueprintGenericEditor { ${this.hass.localize("ui.panel.config.script.editor.migrate")}
` - : ""} + : nothing} + ${this.config.description + ? html`` + : nothing} ${this.renderCard()} `; }