mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-08 18:06:36 +00:00
Fix stuck onboarding when no devices are discovered (#25106)
* Broken onboarding * Introduce a boolean var and return previous code * Remove import
This commit is contained in:
parent
fcab356639
commit
48c90267df
@ -35,7 +35,9 @@ class OnboardingIntegrations extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
@state() private _entries: ConfigEntry[] = [];
|
@state() private _entries: ConfigEntry[] = [];
|
||||||
|
|
||||||
@state() private _discoveredDomains = new Set<string>();
|
@state() private _discoveredDomains: Set<string> = new Set<string>();
|
||||||
|
|
||||||
|
@state() private _discoveredDomainsReceived = false;
|
||||||
|
|
||||||
public hassSubscribe(): (UnsubscribeFunc | Promise<UnsubscribeFunc>)[] {
|
public hassSubscribe(): (UnsubscribeFunc | Promise<UnsubscribeFunc>)[] {
|
||||||
return [
|
return [
|
||||||
@ -53,6 +55,7 @@ class OnboardingIntegrations extends SubscribeMixin(LitElement) {
|
|||||||
"title",
|
"title",
|
||||||
Array.from(this._discoveredDomains)
|
Array.from(this._discoveredDomains)
|
||||||
);
|
);
|
||||||
|
this._discoveredDomainsReceived = true;
|
||||||
}),
|
}),
|
||||||
subscribeConfigEntries(
|
subscribeConfigEntries(
|
||||||
this.hass,
|
this.hass,
|
||||||
@ -97,7 +100,7 @@ class OnboardingIntegrations extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
if (!this._discoveredDomains.size) {
|
if (!this._discoveredDomainsReceived) {
|
||||||
return nothing;
|
return nothing;
|
||||||
}
|
}
|
||||||
// Render discovered and existing entries together sorted by localized title.
|
// Render discovered and existing entries together sorted by localized title.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user