Skip to content

Commit

Permalink
Fix conversation agent fallback (home-assistant#139421)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored Feb 27, 2025
1 parent f677b91 commit 744a7a0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions homeassistant/components/assist_pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,12 +1103,16 @@ async def recognize_intent(
) & conversation.ConversationEntityFeature.CONTROL:
intent_filter = _async_local_fallback_intent_filter

# Try local intents first, if preferred.
elif self.pipeline.prefer_local_intents and (
intent_response := await conversation.async_handle_intents(
self.hass,
user_input,
intent_filter=intent_filter,
# Try local intents
if (
intent_response is None
and self.pipeline.prefer_local_intents
and (
intent_response := await conversation.async_handle_intents(
self.hass,
user_input,
intent_filter=intent_filter,
)
)
):
# Local intent matched
Expand Down

0 comments on commit 744a7a0

Please sign in to comment.