Make sure conversation entities have correct name in list output (#118272)

This commit is contained in:
Paulus Schoutsen
2024-05-27 21:45:14 -04:00
committed by GitHub
parent a5644c8ddb
commit aa78998f41
@@ -128,10 +128,14 @@ async def websocket_list_agents(
language, supported_languages, country
)
name = entity.entity_id
if state := hass.states.get(entity.entity_id):
name = state.name
agents.append(
{
"id": entity.entity_id,
"name": entity.name or entity.entity_id,
"name": name,
"supported_languages": supported_languages,
}
)