Wait for person before creating user in onboarding (#25011)

This commit is contained in:
Bram Kragten 2025-04-11 15:19:22 +02:00 committed by GitHub
parent 1dfd937c94
commit b9433b96dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@ import type {
HaFormDataContainer,
HaFormSchema,
} from "../components/ha-form/types";
import { onboardUserStep } from "../data/onboarding";
import { onboardUserStep, waitForIntegration } from "../data/onboarding";
import type { ValueChangedEvent } from "../types";
import { onBoardingStyles } from "./styles";
import { debounce } from "../common/util/debounce";
@ -196,6 +196,9 @@ class OnboardingCreateUser extends LitElement {
try {
const clientId = genClientId();
// Person integration is used for onboarding, so we wait for it to be set up. It is not critical, so if it fails, we just continue
await waitForIntegration("person");
const result = await onboardUserStep({
client_id: clientId,
name: String(this._newUser.name),