From 6d2e7f9fbd926c3c9387987b0893803eb404d61d Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 5 Dec 2024 17:01:04 +0100 Subject: [PATCH 1/6] Improve trigger and action description for conversation (#23141) --- src/data/automation_i18n.ts | 20 ++++++++++++++------ src/data/script_i18n.ts | 5 +++++ src/translations/en.json | 6 ++++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/data/automation_i18n.ts b/src/data/automation_i18n.ts index 94c2946346..616659e682 100644 --- a/src/data/automation_i18n.ts +++ b/src/data/automation_i18n.ts @@ -682,19 +682,27 @@ const tryDescribeTrigger = ( // Conversation Trigger if (trigger.trigger === "conversation") { - if (!trigger.command) { + if (!trigger.command || !trigger.command.length) { return hass.localize( `${triggerTranslationBaseKey}.conversation.description.empty` ); } + const commands = ensureArray(trigger.command); + + if (commands.length === 1) { + return hass.localize( + `${triggerTranslationBaseKey}.conversation.description.single`, + { + sentence: commands[0], + } + ); + } return hass.localize( - `${triggerTranslationBaseKey}.conversation.description.full`, + `${triggerTranslationBaseKey}.conversation.description.multiple`, { - sentence: formatListWithOrs( - hass.locale, - ensureArray(trigger.command).map((cmd) => `'${cmd}'`) - ), + sentence: commands[0], + count: commands.length - 1, } ); } diff --git a/src/data/script_i18n.ts b/src/data/script_i18n.ts index 81cd488236..a459d23ff4 100644 --- a/src/data/script_i18n.ts +++ b/src/data/script_i18n.ts @@ -486,6 +486,11 @@ const tryDescribeAction = ( if (actionType === "set_conversation_response") { const config = action as SetConversationResponseAction; + if (isTemplate(config.set_conversation_response)) { + return hass.localize( + `${actionTranslationBaseKey}.set_conversation_response.description.template` + ); + } return hass.localize( `${actionTranslationBaseKey}.set_conversation_response.description.full`, { response: config.set_conversation_response } diff --git a/src/translations/en.json b/src/translations/en.json index bdb721c507..ec56a5416a 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -3124,7 +3124,8 @@ "description": { "picker": "When Assist matches a sentence from a voice assistant.", "empty": "When a sentence is said", - "full": "When the sentence {sentence} is said" + "single": "When the sentence ''{sentence}'' is said", + "multiple": "When the sentence ''{sentence}'' or {count, plural,\n one {another}\n other {{count} others}\n} are said" } }, "tag": { @@ -3598,7 +3599,8 @@ "label": "Set conversation response", "description": { "picker": "Set response of conversation if automation was triggered by conversation trigger.", - "full": "Set response of conversation to {response}" + "template": "Set response of conversation to a template", + "full": "Set response of conversation to ''{response}''" } }, "unknown": { From cd8900dd26439f4b34a986feb66260223e0d115c Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 5 Dec 2024 10:14:06 +0100 Subject: [PATCH 2/6] Voice addon install: try to find discovered flow (#23146) --- .../voice-assistant-setup-step-local.ts | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-local.ts b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-local.ts index 1926f83e1e..b0279b6098 100644 --- a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-local.ts +++ b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-local.ts @@ -11,7 +11,11 @@ import { listAssistPipelines, } from "../../data/assist_pipeline"; import type { AssistSatelliteConfiguration } from "../../data/assist_satellite"; -import { createConfigFlow, handleConfigFlowStep } from "../../data/config_flow"; +import { + createConfigFlow, + fetchConfigFlowInProgress, + handleConfigFlowStep, +} from "../../data/config_flow"; import type { EntityRegistryDisplayEntry } from "../../data/entity_registry"; import { fetchHassioAddonsInfo, @@ -194,6 +198,35 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { } private async _setupConfigEntry(addon: string) { + const configFlow = await this._findConfigFlowInProgress(addon); + + if (configFlow) { + const step = await handleConfigFlowStep( + this.hass, + configFlow.flow_id, + {} + ); + if (step.type === "create_entry") { + return undefined; + } + } + + return this._createConfigEntry(addon); + } + + private async _findConfigFlowInProgress(addon: string) { + const configFlows = await fetchConfigFlowInProgress(this.hass.connection); + + return configFlows.find( + (flow) => + flow.handler === "wyoming" && + flow.context.source === "hassio" && + (flow.context.configuration_url.includes(`core_${addon}`) || + flow.context.title_placeholders.title.toLowerCase().includes(addon)) + ); + } + + private async _createConfigEntry(addon: string) { const configFlow = await createConfigFlow(this.hass, "wyoming"); const step = await handleConfigFlowStep(this.hass, configFlow.flow_id, { host: `core-${addon}`, From 8ca52820b1444bd4bc9909baf2d3a964e955c9d7 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Thu, 5 Dec 2024 08:02:55 -0800 Subject: [PATCH 3/6] Missing horiz swing mode import (#23168) --- .../lovelace/create-element/create-card-feature-element.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panels/lovelace/create-element/create-card-feature-element.ts b/src/panels/lovelace/create-element/create-card-feature-element.ts index 04f0efa876..872ceb0aba 100644 --- a/src/panels/lovelace/create-element/create-card-feature-element.ts +++ b/src/panels/lovelace/create-element/create-card-feature-element.ts @@ -1,6 +1,7 @@ import "../card-features/hui-alarm-modes-card-feature"; import "../card-features/hui-climate-fan-modes-card-feature"; import "../card-features/hui-climate-swing-modes-card-feature"; +import "../card-features/hui-climate-swing-horizontal-modes-card-feature"; import "../card-features/hui-climate-hvac-modes-card-feature"; import "../card-features/hui-climate-preset-modes-card-feature"; import "../card-features/hui-cover-open-close-card-feature"; From 287a068ada8080dbb4553978efd8897172ca4928 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 6 Dec 2024 08:11:17 +0100 Subject: [PATCH 4/6] Add localisation to voice wizard (#23169) * Add localization to voice wizard * more --- .../cloud/cloud-step-intro.ts | 19 +++- .../cloud/cloud-step-signin.ts | 6 +- .../cloud/cloud-step-signup.ts | 24 +++-- .../voice-assistant-setup-dialog.ts | 8 +- .../voice-assistant-setup-step-area.ts | 21 ++++- ...e-assistant-setup-step-change-wake-word.ts | 19 ++-- .../voice-assistant-setup-step-check.ts | 35 +++++-- .../voice-assistant-setup-step-local.ts | 91 ++++++++++++++----- .../voice-assistant-setup-step-pipeline.ts | 70 +++++++++++--- .../voice-assistant-setup-step-success.ts | 11 ++- .../voice-assistant-setup-step-update.ts | 13 ++- .../voice-assistant-setup-step-wake-word.ts | 39 ++++++-- src/translations/en.json | 83 +++++++++++++++++ 13 files changed, 346 insertions(+), 93 deletions(-) diff --git a/src/dialogs/voice-assistant-setup/cloud/cloud-step-intro.ts b/src/dialogs/voice-assistant-setup/cloud/cloud-step-intro.ts index cc00cf7c81..c2edcf4949 100644 --- a/src/dialogs/voice-assistant-setup/cloud/cloud-step-intro.ts +++ b/src/dialogs/voice-assistant-setup/cloud/cloud-step-intro.ts @@ -18,7 +18,11 @@ export class CloudStepIntro extends LitElement { src=${`/static/images/logo_nabu_casa${this.hass.themes?.darkMode ? "_dark" : ""}.png`} alt="Nabu Casa logo" /> -

The power of Home Assistant Cloud

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.cloud.title" + )} +

@@ -45,12 +49,15 @@ export class CloudStepIntro extends LitElement {

- Remote access + ${this.hass.localize( + "ui.panel.config.voice_assistants.assistants.cloud.features.remote_access.title" + )}

- Secure remote access to your system while supporting the - development of Home Assistant. + ${this.hass.localize( + "ui.panel.config.voice_assistants.assistants.cloud.features.remote_access.text" + )}

@@ -101,7 +108,9 @@ export class CloudStepIntro extends LitElement { Try 1 month for free${this.hass.localize( + "ui.panel.config.cloud.register.headline" + )}
`; } diff --git a/src/dialogs/voice-assistant-setup/cloud/cloud-step-signin.ts b/src/dialogs/voice-assistant-setup/cloud/cloud-step-signin.ts index 4d17b25693..d4c3663682 100644 --- a/src/dialogs/voice-assistant-setup/cloud/cloud-step-signin.ts +++ b/src/dialogs/voice-assistant-setup/cloud/cloud-step-signin.ts @@ -32,7 +32,7 @@ export class CloudStepSignin extends LitElement { src=${`/static/images/logo_nabu_casa${this.hass.themes?.darkMode ? "_dark" : ""}.png`} alt="Nabu Casa logo" /> -

Sign in

+

${this.hass.localize("ui.panel.config.cloud.login.sign_in")}

${this._error ? html`${this._error}` : ""} @@ -73,7 +73,9 @@ export class CloudStepSignin extends LitElement { unelevated @click=${this._handleLogin} .disabled=${this._requestInProgress} - >Sign in${this.hass.localize( + "ui.panel.config.cloud.login.sign_in" + )} `; } diff --git a/src/dialogs/voice-assistant-setup/cloud/cloud-step-signup.ts b/src/dialogs/voice-assistant-setup/cloud/cloud-step-signup.ts index 0ec6ef0a69..3e8437fe2f 100644 --- a/src/dialogs/voice-assistant-setup/cloud/cloud-step-signup.ts +++ b/src/dialogs/voice-assistant-setup/cloud/cloud-step-signup.ts @@ -40,14 +40,18 @@ export class CloudStepSignup extends LitElement { src=${`/static/images/logo_nabu_casa${this.hass.themes?.darkMode ? "_dark" : ""}.png`} alt="Nabu Casa logo" /> -

Sign up

+

+ ${this.hass.localize("ui.panel.config.cloud.register.create_account")} +

${this._error ? html`${this._error}` : ""} ${this._state === "VERIFY" ? html`

- Check the email we just sent to ${this._email} and click the - confirmation link to continue. + ${this.hass.localize( + "ui.panel.config.cloud.register.confirm_email", + { email: this._email } + )}

` : html`Send the email again${this.hass.localize( + "ui.panel.config.cloud.register.resend_confirm_email" + )}I clicked the link${this.hass.localize( + "ui.panel.config.cloud.register.clicked_confirm" + )}` : html`Sign in${this.hass.localize( + "ui.panel.config.cloud.login.sign_in" + )} Next${this.hass.localize("ui.common.next")}`} `; } diff --git a/src/dialogs/voice-assistant-setup/voice-assistant-setup-dialog.ts b/src/dialogs/voice-assistant-setup/voice-assistant-setup-dialog.ts index 66c0f4ad1f..eadf4a901a 100644 --- a/src/dialogs/voice-assistant-setup/voice-assistant-setup-dialog.ts +++ b/src/dialogs/voice-assistant-setup/voice-assistant-setup-dialog.ts @@ -145,7 +145,9 @@ export class HaVoiceAssistantSetupDialog extends LitElement { @click=${this._goToNextStep} class="skip-btn" slot="actionItems" - >Skip${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.skip" + )}` : nothing} @@ -164,7 +166,9 @@ export class HaVoiceAssistantSetupDialog extends LitElement { )} >` : assistEntityState?.state === UNAVAILABLE - ? html`Your voice assistant is not available.` + ? this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.not_available" + ) : this._step === STEP.CHECK ? html` -

Select area

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.area.title" + )} +

- When you voice assistant knows where it is, it can better control the - devices around it. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.area.secondary" + )}

`; } private async _setArea() { const area = this.shadowRoot!.querySelector("ha-area-picker")!.value; if (!area) { - showAlertDialog(this, { text: "Please select an area" }); + showAlertDialog(this, { + text: this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.area.no_selection" + ), + }); return; } await updateDeviceRegistryEntry(this.hass, this.deviceId, { diff --git a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-change-wake-word.ts b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-change-wake-word.ts index c5894c7651..645d2ce8de 100644 --- a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-change-wake-word.ts +++ b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-change-wake-word.ts @@ -1,14 +1,13 @@ import { css, html, LitElement } from "lit"; import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; +import "../../components/ha-md-list"; +import "../../components/ha-md-list-item"; import type { AssistSatelliteConfiguration } from "../../data/assist_satellite"; import { setWakeWords } from "../../data/assist_satellite"; import type { HomeAssistant } from "../../types"; -import { STEP } from "./voice-assistant-setup-dialog"; import { AssistantSetupStyles } from "./styles"; -import "../../components/ha-md-list"; -import "../../components/ha-md-list-item"; -import { formatLanguageCode } from "../../common/language/format_language"; +import { STEP } from "./voice-assistant-setup-dialog"; @customElement("ha-voice-assistant-setup-step-change-wake-word") export class HaVoiceAssistantSetupStepChangeWakeWord extends LitElement { @@ -25,11 +24,15 @@ export class HaVoiceAssistantSetupStepChangeWakeWord extends LitElement { src="/static/images/voice-assistant/change-wake-word.png" alt="Casita Home Assistant logo" /> -

Change wake word

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.change_wake_word.title" + )} +

- Some wake words are better for - ${formatLanguageCode(this.hass.locale.language, this.hass.locale)} and - voice than others. Please try them out. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.change_wake_word.secondary" + )}

diff --git a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-check.ts b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-check.ts index eba258fa6a..31d8032dc2 100644 --- a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-check.ts +++ b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-check.ts @@ -40,11 +40,15 @@ export class HaVoiceAssistantSetupStepCheck extends LitElement { src="/static/images/voice-assistant/error.png" alt="Casita Home Assistant error logo" /> -

The voice assistant is unable to connect to Home Assistant

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.check.failed_title" + )} +

- To play audio, the voice assistant device has to connect to Home - Assistant to fetch the files. Our test shows that the device is - unable to reach the Home Assistant server. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.check.failed_secondary" + )}

` : html`Casita Home Assistant hi logo -

Hi

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.check.title" + )} +

- Over the next couple steps we're going to personalize your voice - assistant. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.check.secondary" + )}

${this._showLoader diff --git a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-local.ts b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-local.ts index b0279b6098..e4ff17d33f 100644 --- a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-local.ts +++ b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-local.ts @@ -54,9 +54,15 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { src="/static/images/voice-assistant/update.png" alt="Casita Home Assistant loading logo" /> -

Installing add-ons

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.title" + )} +

- The Whisper and Piper add-ons are being installed and configured. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.secondary" + )}

@@ -67,13 +73,20 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { src="/static/images/voice-assistant/error.png" alt="Casita Home Assistant error logo" /> -

Failed to install add-ons

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.failed_title" + )} +

${this._error}

- We could not automatically install a local TTS and STT provider - for you. Read the documentation to learn how to install them. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.failed_secondary" + )}

- Go back + ${this.hass.localize("ui.common.back")} - Learn more ` : this._state === "NOT_SUPPORTED" @@ -92,13 +107,19 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { src="/static/images/voice-assistant/error.png" alt="Casita Home Assistant error logo" /> -

Installation of add-ons is not supported on your system

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.not_supported_title" + )} +

- Your system is not supported to automatically install a local - TTS and STT provider. Learn how to set up local TTS and STT - providers in the documentation. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.not_supported_secondary" + )}

- Go back + ${this.hass.localize("ui.common.back")} - Learn more ` : nothing} @@ -155,29 +178,43 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { const piper = addons.find((addon) => addon.slug === "core_piper"); if (!this._localTts.length) { if (!piper) { - this._detailState = "Installing Piper add-on"; + this._detailState = this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.state.installing_piper" + ); await installHassioAddon(this.hass, "core_piper"); } if (!piper || piper.state !== "started") { - this._detailState = "Starting Piper add-on"; + this._detailState = this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.state.starting_piper" + ); await startHassioAddon(this.hass, "core_piper"); } - this._detailState = "Setting up Piper"; + this._detailState = this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.state.setup_piper" + ); await this._setupConfigEntry("piper"); } if (!this._localStt.length) { if (!whisper) { - this._detailState = "Installing Whisper add-on"; + this._detailState = this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.state.installing_whisper" + ); await installHassioAddon(this.hass, "core_whisper"); } if (!whisper || whisper.state !== "started") { - this._detailState = "Starting Whisper add-on"; + this._detailState = this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.state.starting_whisper" + ); await startHassioAddon(this.hass, "core_whisper"); } - this._detailState = "Setting up Whisper"; + this._detailState = this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.state.setup_whisper" + ); await this._setupConfigEntry("whisper"); } - this._detailState = "Creating assistant"; + this._detailState = this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.state.creating_pipeline" + ); await this._findEntitiesAndCreatePipeline(); } catch (e: any) { this._state = "ERROR"; @@ -234,7 +271,7 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { }); if (step.type !== "create_entry") { throw new Error( - `Failed to create entry for ${addon}${"errors" in step ? `: ${step.errors.base}` : ""}` + `${this.hass.localize("ui.panel.config.voice_assistants.satellite_wizard.local.errors.failed_create_entry", { addon })}${"errors" in step ? `: ${step.errors.base}` : ""}` ); } } @@ -322,7 +359,9 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { ) ).providers.find((provider) => provider.engine_id === sttEntityId); - let pipelineName = "Local Assistant"; + let pipelineName = this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.local_pipeline" + ); let i = 1; while ( pipelines.pipelines.find( @@ -330,7 +369,7 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { (pipeline) => pipeline.name === pipelineName ) ) { - pipelineName = `Local Assistant ${i}`; + pipelineName = `${this.hass.localize("ui.panel.config.voice_assistants.satellite_wizard.local.local_pipeline")} ${i}`; i++; } @@ -353,7 +392,11 @@ export class HaVoiceAssistantSetupStepLocal extends LitElement { this._findLocalEntities(); if (!this._localTts?.length || !this._localStt?.length) { if (tryNo > 3) { - throw new Error("Could not find local TTS and STT entities"); + throw new Error( + this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.local.errors.could_not_find_entities" + ) + ); } await new Promise((resolve) => { setTimeout(resolve, 2000); diff --git a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-pipeline.ts b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-pipeline.ts index d008d312f0..e75e4260cf 100644 --- a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-pipeline.ts +++ b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-pipeline.ts @@ -14,9 +14,9 @@ import { fetchCloudStatus } from "../../data/cloud"; import { listSTTEngines } from "../../data/stt"; import { listTTSEngines, listTTSVoices } from "../../data/tts"; import type { HomeAssistant } from "../../types"; +import { documentationUrl } from "../../util/documentation-url"; import { AssistantSetupStyles } from "./styles"; import { STEP } from "./voice-assistant-setup-dialog"; -import { documentationUrl } from "../../util/documentation-url"; @customElement("ha-voice-assistant-setup-step-pipeline") export class HaVoiceAssistantSetupStepPipeline extends LitElement { @@ -69,10 +69,15 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement { } return html`
-

What hardware do you want to use?

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.title" + )} +

- How quickly your assistant responds depends on the power of the - hardware. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.secondary" + )}

@@ -80,7 +85,12 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement { ${!this._showFirst ? "…" : "Turn on the lights in the bedroom"}
${this._showFirst - ? html`
0.2 seconds
` + ? html`
+ 0.2 + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.seconds" + )} +
` : nothing} ${this._showFirst ? html`
@@ -88,12 +98,23 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement {
` : nothing} ${this._showSecond - ? html`
0.4 seconds
` + ? html`
+ 0.4 + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.seconds" + )} +
` : nothing}

Home Assistant Cloud

-

Ideal if you don't have a powerful system at home.

- Learn more +

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.cloud.description" + )} +

+ ${this.hass.localize("ui.panel.config.common.learn_more")}
@@ -101,7 +122,12 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement { ${!this._showThird ? "…" : "Turn on the lights in the bedroom"}
${this._showThird - ? html`
3 seconds
` + ? html`
+ 3 + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.seconds" + )} +
` : nothing} ${this._showThird ? html`
@@ -109,13 +135,23 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement {
` : nothing} ${this._showFourth - ? html`
5 seconds
` + ? html`
+ 5 + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.seconds" + )} +
` : nothing}
-

Do-it-yourself

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.local.title" + )} +

- Install add-ons or containers to run it on your own system. Powerful - hardware is needed for fast responses. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.local.description" + )}

- Learn more Setup with add-ons${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.pipeline.local.setup" + )}
diff --git a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-success.ts b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-success.ts index 4b8e88fcb4..27e0a188d8 100644 --- a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-success.ts +++ b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-success.ts @@ -72,10 +72,15 @@ export class HaVoiceAssistantSetupStepSuccess extends LitElement { src="/static/images/voice-assistant/heart.png" alt="Casita Home Assistant logo" /> -

Ready to Assist!

+

+ ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.success.title" + )} +

- Make any final customizations here. You can always change these in the - Voice Assistants section of the settings page. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.success.secondary" + )}

${this.assistConfiguration && diff --git a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-update.ts b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-update.ts index cba6ebec50..4c61291f81 100644 --- a/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-update.ts +++ b/src/dialogs/voice-assistant-setup/voice-assistant-setup-step-update.ts @@ -72,12 +72,17 @@ export class HaVoiceAssistantSetupStepUpdate extends LitElement {

${stateObj && (stateObj.state === "unavailable" || updateIsInstalling(stateObj)) - ? "Updating your voice assistant" - : "Checking for updates"} + ? this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.update.title" + ) + : this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.update.checking" + )}

- We are making sure you have the latest and greatest version of your - voice assistant. This may take a few minutes. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.update.secondary" + )}

- Say “${this._activeWakeWord(this.assistConfiguration)}” to wake the - device up + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.wake_word.title", + { wakeword: this._activeWakeWord(this.assistConfiguration) } + )}

-

Setup will continue once the device is awake.

+

${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.wake_word.secondary" + )}

` : html`Casita Home Assistant logo

- Say “${this._activeWakeWord(this.assistConfiguration)}” again + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.wake_word.title_2", + { wakeword: this._activeWakeWord(this.assistConfiguration) } + )}

- To make sure the wake word works for you. + ${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.wake_word.secondary_2" + )}

`} ${this._timedout ? html`We have not heard the wake word, is your device muted?${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.wake_word.time_out" + )}` : this._muteSwitchEntity && this.hass.states[this._muteSwitchEntity].state === "on" - ? html`Please unmute your device to continue.${this.hass.localize( + "ui.panel.config.voice_assistants.satellite_wizard.wake_word.muted_description" + )}` : nothing} `; } diff --git a/src/translations/en.json b/src/translations/en.json index ec56a5416a..5676049328 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2771,6 +2771,10 @@ "speech": { "title": "Amazing speech options for Assist", "text": "Bring personality to your home by having it speak to you using our neural-network powered speech-to-text and text-to-speech services." + }, + "remote_access": { + "title": "Remote access", + "text": " Secure remote access to your system while supporting the development of Home Assistant." } }, "and_more": "And more", @@ -2824,6 +2828,83 @@ "expose_to": "to {assistants}", "expose_entities": "Expose {count} {count, plural,\n one {entity}\n other {entities}\n}" } + }, + "satellite_wizard": { + "skip": "Skip", + "not_available": "Your voice assistant is not available.", + "update": { + "title": "Updating", + "checking": "Checking for updates", + "secondary": "We are making sure you have the latest updates. This may take a few minutes." + }, + "check": { + "title": "Hello!", + "secondary": "Over the next couple steps we're going to personalize your voice assistant.", + "failed_title": "The voice assistant is unable to connect to Home Assistant", + "failed_secondary": "To play audio, the voice assistant device has to connect to Home Assistant to fetch the files. Our test shows that the device is unable to reach the Home Assistant server.", + "help": "Help me", + "retry": "Retry" + }, + "wake_word": { + "title": "Say ''{wakeword}'' to wake the device up", + "secondary": "Setup will continue once the device is awake.", + "title_2": "Say ''{wakeword}'' again", + "secondary_2": "To make sure the wake word works for you.", + "change_wake_word": "Change wake word", + "time_out": "We have not heard the wake word, is your device muted?", + "muted": "Your device is muted", + "muted_description": "Please unmute your device to continue." + }, + "change_wake_word": { + "title": "Change wake word", + "secondary": "These are the phrases you can use to wake your device and have it start listening for commands." + }, + "area": { + "title": "Select area", + "secondary": "When your voice assistant knows where it is, it can better control the devices around it. This allows you to control devices in the room with short commands, like 'turn on the lights'", + "no_selection": "Please select an area" + }, + "pipeline": { + "title": "What hardware do you want to use?", + "secondary": "How quickly your assistant responds depends on the power of the hardware.", + "seconds": "seconds", + "cloud": { + "description": "Ideal if you don't have a powerful system at home." + }, + "local": { "title": "", "description": "", "setup": "" } + }, + "cloud": { + "title": "The power of Home Assistant Cloud", + "register": { + "confirm_email": "Confirm email" + } + }, + "local": { + "title": "Installing add-ons", + "secondary": "The Whisper and Piper add-ons are being installed and configured based on your hardware.", + "failed_title": "Failed to install add-ons", + "failed_secondary": "We were unable to install the Whisper and Piper add-ons automatically for you. Read the documentation to learn how to install them.", + "not_supported_title": "Installation of add-ons is not supported on your system", + "not_supported_secondary": "Your system is not supported to automatically install a local TTS and STT provider. Learn how to set up local TTS and STT providers in the documentation.", + "local_pipeline": "Local Assistant", + "state": { + "installing_piper": "Installing Piper add-on", + "starting_piper": "Starting Piper add-on", + "setup_piper": "Setting up Piper", + "installing_whisper": "Installing Whisper add-on", + "starting_whisper": "Starting Whisper add-on", + "setup_whisper": "Setting up Whisper", + "creating_pipeline": "Creating assistant" + }, + "errors": { + "failed_create_entry": "Failed to create entry for {addon}", + "could_not_find_entities": "Could not find local TTS and STT entities" + } + }, + "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." + } } }, "automation": { @@ -3967,6 +4048,8 @@ "password_error_msg": "Passwords are at least 8 characters", "start_trial": "Start trial", "resend_confirm_email": "Resend confirmation email", + "clicked_confirm": "I clicked the confirmation link", + "confirm_email": "Check the email we just sent to {email} and click the confirmation link to continue.", "account_created": "Account created! Check your email for instructions on how to activate your account." }, "account": { From c6c5ea34d385b51e88ecabf8f712937f91a0893d Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 6 Dec 2024 09:19:56 +0100 Subject: [PATCH 5/6] Fix text color in ha-md-select in dark mode (#23174) --- src/components/ha-md-select.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ha-md-select.ts b/src/components/ha-md-select.ts index 924fc21635..7dc7ef03f6 100644 --- a/src/components/ha-md-select.ts +++ b/src/components/ha-md-select.ts @@ -18,6 +18,7 @@ export class HaMdSelect extends MdFilledSelect { --md-sys-color-on-surface: var(--input-ink-color); --md-sys-color-surface-container: var(--input-fill-color); + --md-sys-color-on-secondary-container: var(--primary-text-color); --md-sys-color-secondary-container: var(--input-fill-color); --md-menu-container-color: var(--card-background-color); } From f3e0df93b5e6bb6893d42edad8134c32185c5f75 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 6 Dec 2024 10:37:14 +0100 Subject: [PATCH 6/6] Bumped version to 20241127.5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e0d234d749..0a0ba72545 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20241127.4" +version = "20241127.5" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md"