Cloud login: Wait with navigate until confirm action is done (#23310)

Wait with navigate until confirm action is done
This commit is contained in:
Bram Kragten 2024-12-16 14:08:30 +01:00 committed by GitHub
parent 678af025ac
commit 875ab0cb97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,7 +233,6 @@ export class CloudLogin extends LitElement {
const doLogin = async (username: string) => {
try {
const result = await cloudLogin(this.hass, username, password);
fireEvent(this, "ha-refresh-cloud-status");
this.email = "";
this._password = "";
if (result.cloud_pipeline) {
@ -250,6 +249,7 @@ export class CloudLogin extends LitElement {
setAssistPipelinePreferred(this.hass, result.cloud_pipeline);
}
}
fireEvent(this, "ha-refresh-cloud-status");
} catch (err: any) {
const errCode = err && err.body && err.body.code;
if (errCode === "PasswordChangeRequired") {