1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-08 17:28:46 +01:00

Prepare conversation agent (#15135)

This commit is contained in:
Paulus Schoutsen
2023-01-19 10:28:03 -05:00
committed by GitHub
parent 2f1d783d22
commit d3e20429a4
2 changed files with 11 additions and 0 deletions
+9
View File
@@ -84,3 +84,12 @@ export const setConversationOnboarding = (
type: "conversation/onboarding/set",
shown: value,
});
export const prepareConversation = (
hass: HomeAssistant,
language?: string
): Promise<void> =>
hass.callWS({
type: "conversation/prepare",
language,
});
@@ -22,6 +22,7 @@ import type { HaTextField } from "../../components/ha-textfield";
import {
AgentInfo,
getAgentInfo,
prepareConversation,
processConversationInput,
setConversationOnboarding,
} from "../../data/conversation";
@@ -220,6 +221,7 @@ export class HaVoiceCommandDialog extends LitElement {
text: this.hass.localize("ui.dialogs.voice_command.how_can_i_help"),
},
];
prepareConversation(this.hass, this.hass.language);
}
protected updated(changedProps: PropertyValues) {