From 637eb6e8944fc2da4aacb601352394a720a757bd Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 11 Dec 2024 09:22:47 +0100 Subject: [PATCH] Fix new script/automation dialog --- src/panels/config/automation/dialog-new-automation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/config/automation/dialog-new-automation.ts b/src/panels/config/automation/dialog-new-automation.ts index 835df4b266..82f11b5f24 100644 --- a/src/panels/config/automation/dialog-new-automation.ts +++ b/src/panels/config/automation/dialog-new-automation.ts @@ -205,24 +205,24 @@ class DialogNewAutomation extends LitElement implements HassDialog { return; } const path = (ev.currentTarget! as any).path; - this.closeDialog(); if (this._mode === "script") { showScriptEditor({ use_blueprint: { path } }); } else { showAutomationEditor({ use_blueprint: { path } }); } + this.closeDialog(); } private async _blank(ev) { if (!shouldHandleRequestSelectedEvent(ev)) { return; } - this.closeDialog(); if (this._mode === "script") { showScriptEditor(); } else { showAutomationEditor(); } + this.closeDialog(); } static get styles(): CSSResultGroup {