mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 05:17:20 +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 _discoveredDomains = new Set<string>();
|
||||
@state() private _discoveredDomains: Set<string> = new Set<string>();
|
||||
|
||||
@state() private _discoveredDomainsReceived = false;
|
||||
|
||||
public hassSubscribe(): (UnsubscribeFunc | Promise<UnsubscribeFunc>)[] {
|
||||
return [
|
||||
@ -53,6 +55,7 @@ class OnboardingIntegrations extends SubscribeMixin(LitElement) {
|
||||
"title",
|
||||
Array.from(this._discoveredDomains)
|
||||
);
|
||||
this._discoveredDomainsReceived = true;
|
||||
}),
|
||||
subscribeConfigEntries(
|
||||
this.hass,
|
||||
@ -97,7 +100,7 @@ class OnboardingIntegrations extends SubscribeMixin(LitElement) {
|
||||
}
|
||||
|
||||
protected render() {
|
||||
if (!this._discoveredDomains.size) {
|
||||
if (!this._discoveredDomainsReceived) {
|
||||
return nothing;
|
||||
}
|
||||
// Render discovered and existing entries together sorted by localized title.
|
||||
|
Loading…
x
Reference in New Issue
Block a user