mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add unique id to entity reg list response (#78945)
* Add unique id to entity reg list response * Update test_entity_registry.py
This commit is contained in:
parent
fb32e745fc
commit
7e9be812ca
@ -238,6 +238,7 @@ def _entry_dict(entry: er.RegistryEntry) -> dict[str, Any]:
|
||||
"hidden_by": entry.hidden_by,
|
||||
"icon": entry.icon,
|
||||
"id": entry.id,
|
||||
"unique_id": entry.unique_id,
|
||||
"name": entry.name,
|
||||
"original_name": entry.original_name,
|
||||
"platform": entry.platform,
|
||||
@ -253,5 +254,4 @@ def _entry_ext_dict(entry: er.RegistryEntry) -> dict[str, Any]:
|
||||
data["options"] = entry.options
|
||||
data["original_device_class"] = entry.original_device_class
|
||||
data["original_icon"] = entry.original_icon
|
||||
data["unique_id"] = entry.unique_id
|
||||
return data
|
||||
|
@ -70,6 +70,7 @@ async def test_list_entities(hass, client):
|
||||
"hidden_by": None,
|
||||
"icon": None,
|
||||
"id": ANY,
|
||||
"unique_id": ANY,
|
||||
"name": "Hello World",
|
||||
"original_name": None,
|
||||
"platform": "test_platform",
|
||||
@ -85,6 +86,7 @@ async def test_list_entities(hass, client):
|
||||
"hidden_by": None,
|
||||
"icon": None,
|
||||
"id": ANY,
|
||||
"unique_id": ANY,
|
||||
"name": None,
|
||||
"original_name": None,
|
||||
"platform": "test_platform",
|
||||
@ -122,6 +124,7 @@ async def test_list_entities(hass, client):
|
||||
"hidden_by": None,
|
||||
"icon": None,
|
||||
"id": ANY,
|
||||
"unique_id": ANY,
|
||||
"name": "Hello World",
|
||||
"original_name": None,
|
||||
"platform": "test_platform",
|
||||
|
Loading…
x
Reference in New Issue
Block a user