Fix for integration 'Add entry' unnecessary dialogs (#26285)

This commit is contained in:
Chai 2025-07-25 12:42:34 +01:00 committed by GitHub
parent f428d6b3f2
commit aca4a1f86d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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