Add identifiers to device registry api output (#38427)

pull/38056/head
Charles Garwood 2020-07-31 08:47:01 -05:00 committed by GitHub
parent c795c68bc0
commit 49cbc9735c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,7 @@ def _entry_dict(entry):
"sw_version": entry.sw_version,
"entry_type": entry.entry_type,
"id": entry.id,
"identifiers": list(entry.identifiers),
"via_device_id": entry.via_device_id,
"area_id": entry.area_id,
"name_by_user": entry.name_by_user,

View File

@ -46,6 +46,7 @@ async def test_list_devices(hass, client, registry):
{
"config_entries": ["1234"],
"connections": [["ethernet", "12:34:56:78:90:AB:CD:EF"]],
"identifiers": [["bridgeid", "0123"]],
"manufacturer": "manufacturer",
"model": "model",
"name": None,
@ -58,6 +59,7 @@ async def test_list_devices(hass, client, registry):
{
"config_entries": ["1234"],
"connections": [],
"identifiers": [["bridgeid", "1234"]],
"manufacturer": "manufacturer",
"model": "model",
"name": None,