Add icon to entity registry list for display (#108313)
This commit is contained in:
parent
2e56d7d048
commit
cdf3c07488
2 changed files with 4 additions and 0 deletions
|
@ -136,6 +136,7 @@ ReadOnlyEntityOptionsType = ReadOnlyDict[str, ReadOnlyDict[str, Any]]
|
||||||
DISPLAY_DICT_OPTIONAL = (
|
DISPLAY_DICT_OPTIONAL = (
|
||||||
("ai", "area_id"),
|
("ai", "area_id"),
|
||||||
("di", "device_id"),
|
("di", "device_id"),
|
||||||
|
("ic", "icon"),
|
||||||
("tk", "translation_key"),
|
("tk", "translation_key"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,7 @@ async def test_list_entities_for_display(
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
entity_id="test_domain.test",
|
entity_id="test_domain.test",
|
||||||
has_entity_name=True,
|
has_entity_name=True,
|
||||||
|
icon="mdi:icon",
|
||||||
original_name="Hello World",
|
original_name="Hello World",
|
||||||
platform="test_platform",
|
platform="test_platform",
|
||||||
translation_key="translations_galore",
|
translation_key="translations_galore",
|
||||||
|
@ -170,6 +171,7 @@ async def test_list_entities_for_display(
|
||||||
device_id="device123",
|
device_id="device123",
|
||||||
entity_id="test_domain.nameless",
|
entity_id="test_domain.nameless",
|
||||||
has_entity_name=True,
|
has_entity_name=True,
|
||||||
|
icon=None,
|
||||||
original_name=None,
|
original_name=None,
|
||||||
platform="test_platform",
|
platform="test_platform",
|
||||||
unique_id="2345",
|
unique_id="2345",
|
||||||
|
@ -231,6 +233,7 @@ async def test_list_entities_for_display(
|
||||||
"ec": 1,
|
"ec": 1,
|
||||||
"ei": "test_domain.test",
|
"ei": "test_domain.test",
|
||||||
"en": "Hello World",
|
"en": "Hello World",
|
||||||
|
"ic": "mdi:icon",
|
||||||
"pl": "test_platform",
|
"pl": "test_platform",
|
||||||
"tk": "translations_galore",
|
"tk": "translations_galore",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue