1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Remove entity category system in favor of hidden_by (#68550)

This commit is contained in:
Erik Montnemery
2022-05-02 18:33:16 +02:00
committed by GitHub
parent a4682ae6e1
commit 1aaf78ef99
9 changed files with 42 additions and 51 deletions

View File

@@ -39,20 +39,13 @@ async def test_alexa_config_expose_entity_prefs(hass, cloud_prefs, cloud_stub):
entity_category=EntityCategory.DIAGNOSTIC,
)
entity_entry3 = entity_registry.async_get_or_create(
"light",
"test",
"light_system_id",
suggested_object_id="system_light",
entity_category=EntityCategory.SYSTEM,
)
entity_entry4 = entity_registry.async_get_or_create(
"light",
"test",
"light_hidden_integration_id",
suggested_object_id="hidden_integration_light",
hidden_by=er.RegistryEntryHider.INTEGRATION,
)
entity_entry5 = entity_registry.async_get_or_create(
entity_entry4 = entity_registry.async_get_or_create(
"light",
"test",
"light_hidden_user_id",
@@ -77,7 +70,6 @@ async def test_alexa_config_expose_entity_prefs(hass, cloud_prefs, cloud_stub):
assert not conf.should_expose(entity_entry2.entity_id)
assert not conf.should_expose(entity_entry3.entity_id)
assert not conf.should_expose(entity_entry4.entity_id)
assert not conf.should_expose(entity_entry5.entity_id)
entity_conf["should_expose"] = True
assert conf.should_expose("light.kitchen")
@@ -86,7 +78,6 @@ async def test_alexa_config_expose_entity_prefs(hass, cloud_prefs, cloud_stub):
assert not conf.should_expose(entity_entry2.entity_id)
assert not conf.should_expose(entity_entry3.entity_id)
assert not conf.should_expose(entity_entry4.entity_id)
assert not conf.should_expose(entity_entry5.entity_id)
entity_conf["should_expose"] = None
assert conf.should_expose("light.kitchen")
@@ -95,7 +86,6 @@ async def test_alexa_config_expose_entity_prefs(hass, cloud_prefs, cloud_stub):
assert not conf.should_expose(entity_entry2.entity_id)
assert not conf.should_expose(entity_entry3.entity_id)
assert not conf.should_expose(entity_entry4.entity_id)
assert not conf.should_expose(entity_entry5.entity_id)
assert "alexa" not in hass.config.components
await cloud_prefs.async_update(