mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +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,
|
"hidden_by": entry.hidden_by,
|
||||||
"icon": entry.icon,
|
"icon": entry.icon,
|
||||||
"id": entry.id,
|
"id": entry.id,
|
||||||
|
"unique_id": entry.unique_id,
|
||||||
"name": entry.name,
|
"name": entry.name,
|
||||||
"original_name": entry.original_name,
|
"original_name": entry.original_name,
|
||||||
"platform": entry.platform,
|
"platform": entry.platform,
|
||||||
@ -253,5 +254,4 @@ def _entry_ext_dict(entry: er.RegistryEntry) -> dict[str, Any]:
|
|||||||
data["options"] = entry.options
|
data["options"] = entry.options
|
||||||
data["original_device_class"] = entry.original_device_class
|
data["original_device_class"] = entry.original_device_class
|
||||||
data["original_icon"] = entry.original_icon
|
data["original_icon"] = entry.original_icon
|
||||||
data["unique_id"] = entry.unique_id
|
|
||||||
return data
|
return data
|
||||||
|
@ -70,6 +70,7 @@ async def test_list_entities(hass, client):
|
|||||||
"hidden_by": None,
|
"hidden_by": None,
|
||||||
"icon": None,
|
"icon": None,
|
||||||
"id": ANY,
|
"id": ANY,
|
||||||
|
"unique_id": ANY,
|
||||||
"name": "Hello World",
|
"name": "Hello World",
|
||||||
"original_name": None,
|
"original_name": None,
|
||||||
"platform": "test_platform",
|
"platform": "test_platform",
|
||||||
@ -85,6 +86,7 @@ async def test_list_entities(hass, client):
|
|||||||
"hidden_by": None,
|
"hidden_by": None,
|
||||||
"icon": None,
|
"icon": None,
|
||||||
"id": ANY,
|
"id": ANY,
|
||||||
|
"unique_id": ANY,
|
||||||
"name": None,
|
"name": None,
|
||||||
"original_name": None,
|
"original_name": None,
|
||||||
"platform": "test_platform",
|
"platform": "test_platform",
|
||||||
@ -122,6 +124,7 @@ async def test_list_entities(hass, client):
|
|||||||
"hidden_by": None,
|
"hidden_by": None,
|
||||||
"icon": None,
|
"icon": None,
|
||||||
"id": ANY,
|
"id": ANY,
|
||||||
|
"unique_id": ANY,
|
||||||
"name": "Hello World",
|
"name": "Hello World",
|
||||||
"original_name": None,
|
"original_name": None,
|
||||||
"platform": "test_platform",
|
"platform": "test_platform",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user