From 3527261c230f44351cd1bd6f802edd80a9833fd4 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 10 Feb 2023 08:50:55 +0100 Subject: [PATCH] Revert "Include entity options in RegistryEntry.as_partial_dict (#87539)" This reverts commit 93dafefd967260af1acf085e623de0abe0bed90b. --- homeassistant/components/config/entity_registry.py | 1 + homeassistant/helpers/entity_registry.py | 1 - tests/components/config/test_entity_registry.py | 3 --- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/homeassistant/components/config/entity_registry.py b/homeassistant/components/config/entity_registry.py index 0f48c64ae4..43e433a4f3 100644 --- a/homeassistant/components/config/entity_registry.py +++ b/homeassistant/components/config/entity_registry.py @@ -266,6 +266,7 @@ def _entry_ext_dict(entry: er.RegistryEntry) -> dict[str, Any]: data["aliases"] = entry.aliases data["capabilities"] = entry.capabilities data["device_class"] = entry.device_class + data["options"] = entry.options data["original_device_class"] = entry.original_device_class data["original_icon"] = entry.original_icon return data diff --git a/homeassistant/helpers/entity_registry.py b/homeassistant/helpers/entity_registry.py index 426f84c2f8..5ce1a5b2a4 100644 --- a/homeassistant/helpers/entity_registry.py +++ b/homeassistant/helpers/entity_registry.py @@ -166,7 +166,6 @@ class RegistryEntry: "icon": self.icon, "id": self.id, "name": self.name, - "options": self.options, "original_name": self.original_name, "platform": self.platform, "translation_key": self.translation_key, diff --git a/tests/components/config/test_entity_registry.py b/tests/components/config/test_entity_registry.py index 74a471185f..b396f6a6d1 100644 --- a/tests/components/config/test_entity_registry.py +++ b/tests/components/config/test_entity_registry.py @@ -70,7 +70,6 @@ async def test_list_entities(hass, client): "icon": None, "id": ANY, "name": "Hello World", - "options": {}, "original_name": None, "platform": "test_platform", "translation_key": None, @@ -88,7 +87,6 @@ async def test_list_entities(hass, client): "icon": None, "id": ANY, "name": None, - "options": {}, "original_name": None, "platform": "test_platform", "translation_key": None, @@ -133,7 +131,6 @@ async def test_list_entities(hass, client): "icon": None, "id": ANY, "name": "Hello World", - "options": {}, "original_name": None, "platform": "test_platform", "translation_key": None,