mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Make sure conversation entities have correct name in list output (#118272)
This commit is contained in:
parent
a5644c8ddb
commit
aa78998f41
@ -128,10 +128,14 @@ async def websocket_list_agents(
|
|||||||
language, supported_languages, country
|
language, supported_languages, country
|
||||||
)
|
)
|
||||||
|
|
||||||
|
name = entity.entity_id
|
||||||
|
if state := hass.states.get(entity.entity_id):
|
||||||
|
name = state.name
|
||||||
|
|
||||||
agents.append(
|
agents.append(
|
||||||
{
|
{
|
||||||
"id": entity.entity_id,
|
"id": entity.entity_id,
|
||||||
"name": entity.name or entity.entity_id,
|
"name": name,
|
||||||
"supported_languages": supported_languages,
|
"supported_languages": supported_languages,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user