Fix LLMs asking which area when there is only one device (#118518)

* Ignore deprecated open and close cover intents for LLMs

* Fix LLMs asking which area when there is only one device

* remove unrelated changed

* remove unrelated changes
pull/118520/head
tronikos 2024-05-30 14:14:11 -07:00 committed by GitHub
parent b5ec24ef63
commit 0d6c7d0973
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -282,7 +282,7 @@ class AssistAPI(API):
else:
prompt.append(
"When a user asks to turn on all devices of a specific type, "
"ask user to specify an area."
"ask user to specify an area, unless there is only one device of that type."
)
if not tool_context.device_id or not async_device_supports_timers(

View File

@ -432,7 +432,7 @@ async def test_assist_api_prompt(
area_prompt = (
"When a user asks to turn on all devices of a specific type, "
"ask user to specify an area."
"ask user to specify an area, unless there is only one device of that type."
)
api = await llm.async_get_api(hass, "assist", tool_context)
assert api.api_prompt == (