Fix new script/automation dialog

This commit is contained in:
Paul Bottein 2024-12-11 09:22:47 +01:00
parent f688780677
commit 637eb6e894
No known key found for this signature in database

View File

@ -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 {