Await starting audio recorder (#21557)

This commit is contained in:
Bram Kragten 2024-08-02 12:57:57 +02:00 committed by GitHub
parent 7e799bf639
commit a41978f647
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -486,10 +486,11 @@ export class HaVoiceCommandDialog extends LitElement {
who: "user",
text: "…",
};
this._audioRecorder.start().then(() => {
this._addMessage(userMessage);
this.requestUpdate("_audioRecorder");
});
await this._audioRecorder.start();
this._addMessage(userMessage);
this.requestUpdate("_audioRecorder");
const hassMessage: Message = {
who: "hass",
text: "…",