mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 20:26:39 +00:00
Fix new script/automation dialog
This commit is contained in:
parent
f688780677
commit
637eb6e894
@ -205,24 +205,24 @@ class DialogNewAutomation extends LitElement implements HassDialog {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const path = (ev.currentTarget! as any).path;
|
const path = (ev.currentTarget! as any).path;
|
||||||
this.closeDialog();
|
|
||||||
if (this._mode === "script") {
|
if (this._mode === "script") {
|
||||||
showScriptEditor({ use_blueprint: { path } });
|
showScriptEditor({ use_blueprint: { path } });
|
||||||
} else {
|
} else {
|
||||||
showAutomationEditor({ use_blueprint: { path } });
|
showAutomationEditor({ use_blueprint: { path } });
|
||||||
}
|
}
|
||||||
|
this.closeDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _blank(ev) {
|
private async _blank(ev) {
|
||||||
if (!shouldHandleRequestSelectedEvent(ev)) {
|
if (!shouldHandleRequestSelectedEvent(ev)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.closeDialog();
|
|
||||||
if (this._mode === "script") {
|
if (this._mode === "script") {
|
||||||
showScriptEditor();
|
showScriptEditor();
|
||||||
} else {
|
} else {
|
||||||
showAutomationEditor();
|
showAutomationEditor();
|
||||||
}
|
}
|
||||||
|
this.closeDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user