mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02: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:
@@ -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
|
||||||
|
Reference in New Issue
Block a user