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

Code styling tweaks to core helpers (#85441)

This commit is contained in:
Franck Nijhof
2023-01-09 00:44:09 +01:00
committed by GitHub
parent cf5fca0464
commit 06a35fb7db
22 changed files with 192 additions and 100 deletions

View File

@@ -119,7 +119,8 @@ class RegistryEntry:
has_entity_name: bool = attr.ib(default=False)
name: str | None = attr.ib(default=None)
options: EntityOptionsType = attr.ib(
default=None, converter=attr.converters.default_if_none(factory=dict) # type: ignore[misc]
default=None,
converter=attr.converters.default_if_none(factory=dict), # type: ignore[misc]
)
# As set by integration
original_device_class: str | None = attr.ib(default=None)
@@ -780,8 +781,7 @@ class EntityRegistry:
new_unique_id: str | UndefinedType = UNDEFINED,
new_device_id: str | None | UndefinedType = UNDEFINED,
) -> RegistryEntry:
"""
Update entity platform.
"""Update entity platform.
This should only be used when an entity needs to be migrated between
integrations.