1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 14:08:21 +00:00

Move DeviceInfo from entity to device registry (#98149)

* Move DeviceInfo from entity to device registry

* Update integrations
This commit is contained in:
Erik Montnemery
2023-08-11 04:04:26 +02:00
committed by GitHub
parent 108bcabf75
commit 045c327928
620 changed files with 821 additions and 800 deletions

View File

@@ -28,7 +28,6 @@ if TYPE_CHECKING:
from homeassistant.config_entries import ConfigEntry
from . import entity_registry
from .entity import DeviceInfo
_LOGGER = logging.getLogger(__name__)
@@ -65,6 +64,26 @@ DISABLED_CONFIG_ENTRY = DeviceEntryDisabler.CONFIG_ENTRY.value
DISABLED_INTEGRATION = DeviceEntryDisabler.INTEGRATION.value
DISABLED_USER = DeviceEntryDisabler.USER.value
class DeviceInfo(TypedDict, total=False):
"""Entity device information for device registry."""
configuration_url: str | URL | None
connections: set[tuple[str, str]]
default_manufacturer: str
default_model: str
default_name: str
entry_type: DeviceEntryType | None
identifiers: set[tuple[str, str]]
manufacturer: str | None
model: str | None
name: str | None
suggested_area: str | None
sw_version: str | None
hw_version: str | None
via_device: tuple[str, str]
DEVICE_INFO_TYPES = {
# Device info is categorized by finding the first device info type which has all
# the keys of the device info. The link device info type must be kept first