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:
@@ -289,6 +289,7 @@ class DialogAddAutomationElement
|
||||
|
||||
public showDialog(params): void {
|
||||
this._params = params;
|
||||
this._resetVariables();
|
||||
|
||||
this.addKeyboardShortcuts();
|
||||
|
||||
@@ -378,9 +379,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;
|
||||
@@ -392,7 +399,6 @@ class DialogAddAutomationElement
|
||||
this._narrow = false;
|
||||
this._targetItems = undefined;
|
||||
this._loadItemsError = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private _updateNarrow = () => {
|
||||
|
||||
Reference in New Issue
Block a user