mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 02:49:51 +00:00
review
This commit is contained in:
@@ -286,16 +286,24 @@ export class DialogVoiceAssistantPipelineDetail extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _supportedConversationLanguagesChanged(ev) {
|
private _supportedConversationLanguagesChanged(
|
||||||
this._supportedConversationLanguages = ev.detail.value;
|
ev: CustomEvent<{ value: "*" | string[] | undefined }>
|
||||||
|
) {
|
||||||
|
const value = ev.detail.value;
|
||||||
|
if (value && value !== "*") {
|
||||||
|
this._supportedConversationLanguages = ev.detail.value as string[];
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
|
value &&
|
||||||
this._data?.conversation_language &&
|
this._data?.conversation_language &&
|
||||||
!this._supportedConversationLanguages?.includes(
|
!this._supportedConversationLanguages?.includes(
|
||||||
this._data.conversation_engine!
|
this._data.conversation_language!
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
this._data.conversation_language =
|
this._data = {
|
||||||
this._supportedConversationLanguages?.[0];
|
...this._data,
|
||||||
|
conversation_language: this._supportedConversationLanguages?.[0],
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user