mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Pass down language to hassil (#106490)
Hassil needs the language to convert numbers, this was added in https://github.com/home-assistant/hassil/pull/78. This fixes an annoying warning from the logs. Fixes #104760
This commit is contained in:
parent
8b1db37a85
commit
11170c6345
@ -196,6 +196,7 @@ class DefaultAgent(AbstractConversationAgent):
|
|||||||
lang_intents,
|
lang_intents,
|
||||||
slot_lists,
|
slot_lists,
|
||||||
intent_context,
|
intent_context,
|
||||||
|
language,
|
||||||
)
|
)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
@ -283,6 +284,7 @@ class DefaultAgent(AbstractConversationAgent):
|
|||||||
lang_intents: LanguageIntents,
|
lang_intents: LanguageIntents,
|
||||||
slot_lists: dict[str, SlotList],
|
slot_lists: dict[str, SlotList],
|
||||||
intent_context: dict[str, Any] | None,
|
intent_context: dict[str, Any] | None,
|
||||||
|
language: str,
|
||||||
) -> RecognizeResult | None:
|
) -> RecognizeResult | None:
|
||||||
"""Search intents for a match to user input."""
|
"""Search intents for a match to user input."""
|
||||||
# Prioritize matches with entity names above area names
|
# Prioritize matches with entity names above area names
|
||||||
@ -292,6 +294,7 @@ class DefaultAgent(AbstractConversationAgent):
|
|||||||
lang_intents.intents,
|
lang_intents.intents,
|
||||||
slot_lists=slot_lists,
|
slot_lists=slot_lists,
|
||||||
intent_context=intent_context,
|
intent_context=intent_context,
|
||||||
|
language=language,
|
||||||
):
|
):
|
||||||
if "name" in result.entities:
|
if "name" in result.entities:
|
||||||
return result
|
return result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user