1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Fix automation add TCA dialog sometimes not opening (#51306)

This commit is contained in:
Wendelin
2026-03-31 13:36:56 +02:00
committed by GitHub
parent 70be747e9d
commit 9a62a9217c

View File

@@ -287,6 +287,7 @@ class DialogAddAutomationElement
public showDialog(params): void {
this._params = params;
this._resetVariables();
this.addKeyboardShortcuts();
@@ -376,9 +377,15 @@ class DialogAddAutomationElement
if (this._params) {
fireEvent(this, "dialog-closed", { dialog: this.localName });
}
this._params = undefined;
this._resetVariables();
return true;
}
private _resetVariables() {
this._open = true;
this._closing = false;
this._params = undefined;
this._selectedCollectionIndex = undefined;
this._selectedGroup = undefined;
this._selectedTarget = undefined;
@@ -390,7 +397,6 @@ class DialogAddAutomationElement
this._narrow = false;
this._targetItems = undefined;
this._loadItemsError = false;
return true;
}
private _updateNarrow = () => {