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:
Paul Holzinger 2024-01-04 21:40:49 +01:00 committed by GitHub
parent 8b1db37a85
commit 11170c6345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,6 +196,7 @@ class DefaultAgent(AbstractConversationAgent):
lang_intents,
slot_lists,
intent_context,
language,
)
return result
@ -283,6 +284,7 @@ class DefaultAgent(AbstractConversationAgent):
lang_intents: LanguageIntents,
slot_lists: dict[str, SlotList],
intent_context: dict[str, Any] | None,
language: str,
) -> RecognizeResult | None:
"""Search intents for a match to user input."""
# Prioritize matches with entity names above area names
@ -292,6 +294,7 @@ class DefaultAgent(AbstractConversationAgent):
lang_intents.intents,
slot_lists=slot_lists,
intent_context=intent_context,
language=language,
):
if "name" in result.entities:
return result