mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 20:36:35 +00:00
Fix timeout error handling local voice (#23023)
fix timeout error handling local voice
This commit is contained in:
parent
0a954cf1c7
commit
71214351ca
@ -169,7 +169,7 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement {
|
|||||||
await this._setupConfigEntry("whisper");
|
await this._setupConfigEntry("whisper");
|
||||||
}
|
}
|
||||||
this._detailState = "Creating assistant";
|
this._detailState = "Creating assistant";
|
||||||
this._findEntitiesAndCreatePipeline();
|
await this._findEntitiesAndCreatePipeline();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this._state = "ERROR";
|
this._state = "ERROR";
|
||||||
}
|
}
|
||||||
@ -314,8 +314,10 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement {
|
|||||||
if (tryNo > 3) {
|
if (tryNo > 3) {
|
||||||
throw new Error("Timeout searching for local TTS and STT entities");
|
throw new Error("Timeout searching for local TTS and STT entities");
|
||||||
}
|
}
|
||||||
setTimeout(() => this._findEntitiesAndCreatePipeline(tryNo + 1), 2000);
|
await new Promise<void>((resolve) => {
|
||||||
return;
|
setTimeout(resolve, 2000);
|
||||||
|
});
|
||||||
|
return this._findEntitiesAndCreatePipeline(tryNo + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const localPipeline = await this._createPipeline(
|
const localPipeline = await this._createPipeline(
|
||||||
@ -330,6 +332,7 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement {
|
|||||||
{ entity_id: this.assistConfiguration?.pipeline_entity_id }
|
{ entity_id: this.assistConfiguration?.pipeline_entity_id }
|
||||||
);
|
);
|
||||||
this._nextStep();
|
this._nextStep();
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
static styles = [
|
static styles = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user