diff --git a/homeassistant/helpers/entity_registry.py b/homeassistant/helpers/entity_registry.py index 589b379cf08..c3bd3031750 100644 --- a/homeassistant/helpers/entity_registry.py +++ b/homeassistant/helpers/entity_registry.py @@ -1223,10 +1223,6 @@ class EntityRegistry(BaseRegistry): if data is not None: for entity in data["entities"]: - # We removed this in 2022.5. Remove this check in 2023.1. - if entity["entity_category"] == "system": - entity["entity_category"] = None - try: domain = split_entity_id(entity["entity_id"])[0] _validate_item( diff --git a/tests/helpers/test_entity_registry.py b/tests/helpers/test_entity_registry.py index bc3b2d6f705..bb0b98c247e 100644 --- a/tests/helpers/test_entity_registry.py +++ b/tests/helpers/test_entity_registry.py @@ -398,13 +398,6 @@ async def test_filter_on_load( "unique_id": "disabled-hass", "disabled_by": "hass", # We store the string representation }, - # This entry should have the entity_category reset to None - { - "entity_id": "test.system_entity", - "platform": "super_platform", - "unique_id": "system-entity", - "entity_category": "system", - }, ] }, } @@ -412,13 +405,12 @@ async def test_filter_on_load( await er.async_load(hass) registry = er.async_get(hass) - assert len(registry.entities) == 5 + assert len(registry.entities) == 4 assert set(registry.entities.keys()) == { "test.disabled_hass", "test.disabled_user", "test.named", "test.no_name", - "test.system_entity", } entry_with_name = registry.async_get_or_create( @@ -442,11 +434,6 @@ async def test_filter_on_load( assert entry_disabled_user.disabled assert entry_disabled_user.disabled_by is er.RegistryEntryDisabler.USER - entry_system_category = registry.async_get_or_create( - "test", "system_entity", "system-entity" - ) - assert entry_system_category.entity_category is None - @pytest.mark.parametrize("load_registries", [False]) async def test_load_bad_data(