From e7deb7ba8d74654f75420110e7635518d26c2efe Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 12 Oct 2026 13:10:52 -0400 Subject: [PATCH] Rename the Assist LLM API to Device control (#185999) Co-authored-by: Claude --- homeassistant/components/llm/__init__.py | 2 +- tests/components/llm/test_websocket_api.py | 4 ++-- tests/components/mcp_server/test_config_flow.py | 6 +++--- tests/components/mcp_server/test_http.py | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/homeassistant/components/llm/__init__.py b/homeassistant/components/llm/__init__.py index 7c7b9c22c1a2..ae8b3cabe8a3 100644 --- a/homeassistant/components/llm/__init__.py +++ b/homeassistant/components/llm/__init__.py @@ -144,7 +144,7 @@ class AssistAPI(API): super().__init__( hass=hass, id=LLM_API_ASSIST, - name="Assist", + name="Device control", ) @override diff --git a/tests/components/llm/test_websocket_api.py b/tests/components/llm/test_websocket_api.py index c123f6f6ec26..2a5ccc69887d 100644 --- a/tests/components/llm/test_websocket_api.py +++ b/tests/components/llm/test_websocket_api.py @@ -35,7 +35,7 @@ async def setup_llm(hass: HomeAssistant) -> None: pytest.param( [], [ - {"id": "assist", "name": "Assist", "requires_admin": False}, + {"id": "assist", "name": "Device control", "requires_admin": False}, { "id": "homeassistant", "name": "Home Assistant", @@ -47,7 +47,7 @@ async def setup_llm(hass: HomeAssistant) -> None: pytest.param( [("test-api", "Test API")], [ - {"id": "assist", "name": "Assist", "requires_admin": False}, + {"id": "assist", "name": "Device control", "requires_admin": False}, { "id": "homeassistant", "name": "Home Assistant", diff --git a/tests/components/mcp_server/test_config_flow.py b/tests/components/mcp_server/test_config_flow.py index 4ce657e47965..5b24bf8aae43 100644 --- a/tests/components/mcp_server/test_config_flow.py +++ b/tests/components/mcp_server/test_config_flow.py @@ -47,7 +47,7 @@ async def test_options_flow(hass: HomeAssistant, config_entry: MockConfigEntry) """Test changing the LLM APIs in the options flow.""" llm.async_register_api(hass, MockLLMAPI(hass=hass, id=TEST_LLM_API_ID, name="Test")) # The title generated for the APIs the entry was created with - hass.config_entries.async_update_entry(config_entry, title="Assist") + hass.config_entries.async_update_entry(config_entry, title="Device control") assert await hass.config_entries.async_setup(config_entry.entry_id) result = await hass.config_entries.options.async_init(config_entry.entry_id) @@ -76,7 +76,7 @@ async def test_options_flow(hass: HomeAssistant, config_entry: MockConfigEntry) CONF_LLM_HASS_API: [llm.LLM_API_ASSIST, TEST_LLM_API_ID], CONF_REQUIRE_ADMIN: True, } - assert config_entry.title == "Assist, Test" + assert config_entry.title == "Device control, Test" @pytest.mark.parametrize("llm_hass_api", [llm.LLM_API_ASSIST]) @@ -207,7 +207,7 @@ async def test_options_flow_unmigrated_entry(hass: HomeAssistant) -> None: pytest.param( False, [llm.LLM_API_ASSIST], - "Assist", + "Device control", { CONF_ALL_LLM_APIS: False, CONF_LLM_HASS_API: [llm.LLM_API_ASSIST], diff --git a/tests/components/mcp_server/test_http.py b/tests/components/mcp_server/test_http.py index 3b21dc62e582..94efd8032045 100644 --- a/tests/components/mcp_server/test_http.py +++ b/tests/components/mcp_server/test_http.py @@ -458,7 +458,7 @@ def mcp_client_fixture(mcp_protocol: str) -> Any: pytest.param( mcp.types.ClientRequest( mcp.types.GetPromptRequest( - params=mcp.types.GetPromptRequestParams(name="Assist") + params=mcp.types.GetPromptRequestParams(name="Device control") ) ), mcp.types.GetPromptResult, @@ -722,7 +722,7 @@ async def test_mcp_tools_list_all_llm_apis( result = await session.list_tools() tool_names = {tool.name for tool in result.tools} - assert "assist__homeassistant__GetLiveContext" in tool_names + assert "device-control__homeassistant__GetLiveContext" in tool_names assert "test-api__test_tool" in tool_names @@ -882,8 +882,8 @@ async def test_prompt_list( assert len(result.prompts) == 1 prompt = result.prompts[0] - assert prompt.name == "Assist" - assert prompt.description == "Default prompt for Home Assistant Assist API" + assert prompt.name == "Device control" + assert prompt.description == "Default prompt for Home Assistant Device control API" @pytest.mark.parametrize("llm_hass_api", [llm.LLM_API_ASSIST, STATELESS_LLM_API]) @@ -897,9 +897,9 @@ async def test_prompt_get( """Test the get prompt endpoint.""" async with mcp_client(hass, mcp_url, hass_supervisor_access_token) as session: - result = await session.get_prompt(name="Assist") + result = await session.get_prompt(name="Device control") - assert result.description == "Default prompt for Home Assistant Assist API" + assert result.description == "Default prompt for Home Assistant Device control API" assert len(result.messages) == 1 assert result.messages[0].role == "assistant" assert result.messages[0].content.type == "text"