mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Use cached_property in entity_registry (#100302)
This commit is contained in:
@@ -166,7 +166,7 @@ class HomeAssistantSnapshotSerializer(AmberDataSerializer):
|
||||
cls, data: er.RegistryEntry
|
||||
) -> SerializableData:
|
||||
"""Prepare a Home Assistant entity registry entry for serialization."""
|
||||
serialized = EntityRegistryEntrySnapshot(
|
||||
return EntityRegistryEntrySnapshot(
|
||||
attrs.asdict(data)
|
||||
| {
|
||||
"config_entry_id": ANY,
|
||||
@@ -175,9 +175,6 @@ class HomeAssistantSnapshotSerializer(AmberDataSerializer):
|
||||
"options": {k: dict(v) for k, v in data.options.items()},
|
||||
}
|
||||
)
|
||||
serialized.pop("_partial_repr")
|
||||
serialized.pop("_display_repr")
|
||||
return serialized
|
||||
|
||||
@classmethod
|
||||
def _serializable_flow_result(cls, data: FlowResult) -> SerializableData:
|
||||
|
||||
Reference in New Issue
Block a user