Remove some dead code from the conversation integration (#138878)

This commit is contained in:
Erik Montnemery 2025-02-19 21:51:45 +01:00 committed by GitHub
parent 8e6f2e6ff2
commit 354855ff5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -185,21 +185,6 @@ class IntentCache:
self.cache.clear()
def _get_language_variations(language: str) -> Iterable[str]:
"""Generate language codes with and without region."""
yield language
parts = re.split(r"([-_])", language)
if len(parts) == 3:
lang, sep, region = parts
if sep == "_":
# en_US -> en-US
yield f"{lang}-{region}"
# en-US -> en
yield lang
async def async_setup_default_agent(
hass: core.HomeAssistant,
entity_component: EntityComponent[ConversationEntity],