From a412d7ca6d336b975259a1b6e7f64fc240f3c4e9 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 21 Apr 2023 18:36:29 +0200 Subject: [PATCH] Conversation list WS command: dont include supported_languages when all languages are supported --- homeassistant/components/conversation/__init__.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/conversation/__init__.py b/homeassistant/components/conversation/__init__.py index 5692ddf3a06..5a58d94a15c 100644 --- a/homeassistant/components/conversation/__init__.py +++ b/homeassistant/components/conversation/__init__.py @@ -269,12 +269,15 @@ async def websocket_list_agents( agent_dict: dict[str, Any] = { "id": agent_info.id, "name": agent_info.name, - "supported_languages": agent.supported_languages, } - if language: - agent_dict["supported_languages"] = language_util.matches( - language, agent.supported_languages, country - ) + if agent.supported_languages != "*": + if language: + agent_dict["supported_languages"] = language_util.matches( + language, agent.supported_languages, country + ) + else: + agent_dict["supported_languages"] = agent.supported_languages + agents.append(agent_dict) connection.send_message(websocket_api.result_message(msg["id"], {"agents": agents}))