mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Fix for integration 'Add entry' unnecessary dialogs (#26285)
This commit is contained in:
parent
f428d6b3f2
commit
aca4a1f86d
@ -97,15 +97,12 @@ class AddIntegrationDialog extends LitElement {
|
||||
|
||||
public async showDialog(params?: AddIntegrationDialogParams): Promise<void> {
|
||||
const loadPromise = this._load();
|
||||
this._open = true;
|
||||
this._pickedBrand = params?.brand;
|
||||
this._initialFilter = params?.initialFilter;
|
||||
this._narrow = matchMedia(
|
||||
"all and (max-width: 450px), all and (max-height: 500px)"
|
||||
).matches;
|
||||
if (params?.domain) {
|
||||
this._createFlow(params.domain);
|
||||
// Just open the config flow dialog, do not show this dialog
|
||||
await this._createFlow(params.domain);
|
||||
return;
|
||||
}
|
||||
|
||||
if (params?.brand) {
|
||||
await loadPromise;
|
||||
const brand = this._integrations?.[params.brand];
|
||||
@ -113,6 +110,13 @@ class AddIntegrationDialog extends LitElement {
|
||||
this._fetchFlowsInProgress(Object.keys(brand.integrations));
|
||||
}
|
||||
}
|
||||
// Only open the dialog if no domain is provided
|
||||
this._open = true;
|
||||
this._pickedBrand = params?.brand;
|
||||
this._initialFilter = params?.initialFilter;
|
||||
this._narrow = matchMedia(
|
||||
"all and (max-width: 450px), all and (max-height: 500px)"
|
||||
).matches;
|
||||
}
|
||||
|
||||
public closeDialog() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user