mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Prepare conversation agent (#15135)
This commit is contained in:
parent
2f1d783d22
commit
d3e20429a4
@ -84,3 +84,12 @@ export const setConversationOnboarding = (
|
|||||||
type: "conversation/onboarding/set",
|
type: "conversation/onboarding/set",
|
||||||
shown: value,
|
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 {
|
import {
|
||||||
AgentInfo,
|
AgentInfo,
|
||||||
getAgentInfo,
|
getAgentInfo,
|
||||||
|
prepareConversation,
|
||||||
processConversationInput,
|
processConversationInput,
|
||||||
setConversationOnboarding,
|
setConversationOnboarding,
|
||||||
} from "../../data/conversation";
|
} from "../../data/conversation";
|
||||||
@ -220,6 +221,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
text: this.hass.localize("ui.dialogs.voice_command.how_can_i_help"),
|
text: this.hass.localize("ui.dialogs.voice_command.how_can_i_help"),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
prepareConversation(this.hass, this.hass.language);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updated(changedProps: PropertyValues) {
|
protected updated(changedProps: PropertyValues) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user