fix voice wizard bugs (#24950)

This commit is contained in:
Bram Kragten 2025-04-07 12:41:29 +02:00 committed by GitHub
parent 316c3f4e1f
commit 2ccc5355c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 7 deletions

View File

@ -52,7 +52,8 @@ export const assistSatelliteAnnounce = (
args: {
message?: string;
media_id?: string;
preannounce_media_id?: string | null;
preannounce?: boolean;
preannounce_media_id?: string;
}
) => hass.callService("assist_satellite", "announce", args, { entity_id });

View File

@ -90,6 +90,9 @@ export class HaVoiceAssistantSetupDialog extends LitElement {
this._previousSteps = [];
this._nextStep = undefined;
this._step = STEP.INIT;
this._language = undefined;
this._languages = [];
this._localOption = undefined;
fireEvent(this, "dialog-closed", { dialog: this.localName });
}

View File

@ -103,7 +103,9 @@ export class HaVoiceAssistantSetupStepSuccess extends LitElement {
</ha-select>
<ha-button @click=${this._testWakeWord}>
<ha-svg-icon slot="icon" .path=${mdiMicrophone}></ha-svg-icon>
Test
${this.hass.localize(
"ui.panel.config.voice_assistants.satellite_wizard.success.test_wakeword"
)}
</ha-button>
</div>`
: nothing}
@ -126,7 +128,9 @@ export class HaVoiceAssistantSetupStepSuccess extends LitElement {
</ha-select>
<ha-button @click=${this._openPipeline}>
<ha-svg-icon slot="icon" .path=${mdiCog}></ha-svg-icon>
Edit
${this.hass.localize(
"ui.panel.config.voice_assistants.satellite_wizard.success.edit_pipeline"
)}
</ha-button>
</div>`
: nothing}
@ -142,14 +146,20 @@ export class HaVoiceAssistantSetupStepSuccess extends LitElement {
></ha-tts-voice-picker>
<ha-button @click=${this._testTts}>
<ha-svg-icon slot="icon" .path=${mdiPlay}></ha-svg-icon>
Try
${this.hass.localize(
"ui.panel.config.voice_assistants.satellite_wizard.success.try_tts"
)}
</ha-button>
</div>`
: nothing}
</div>
</div>
<div class="footer">
<ha-button @click=${this._close} unelevated>Done</ha-button>
<ha-button @click=${this._close} unelevated
>${this.hass.localize(
"ui.panel.config.voice_assistants.satellite_wizard.success.done"
)}</ha-button
>
</div>`;
}
@ -248,7 +258,7 @@ export class HaVoiceAssistantSetupStepSuccess extends LitElement {
}
await assistSatelliteAnnounce(this.hass, this.assistEntityId, {
message,
preannounce_media_id: null,
preannounce: false,
});
}

View File

@ -3486,7 +3486,11 @@
},
"success": {
"title": "Ready to Assist!",
"secondary": "Make any final customizations here. You can always change these in the Voice assistants section of the settings page."
"secondary": "Make any final customizations here. You can always change these in the Voice assistants section of the settings page.",
"test_wakeword": "Test",
"edit_pipeline": "Edit",
"try_tts": "Try",
"done": "Done"
}
}
},