You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "The DeviceEntry.suggested_area attribute is deprecated and will be removed"
5
+
---
6
+
7
+
The `DeviceEntry.suggested_area` attribute is deprecated and will be removed in HA Core 2026.9. Also, `suggested_area` will no longer be present in `EVENT_DEVICE_REGISTRY_UPDATED` events when HA Core 2026.9 is released.
8
+
9
+
Note:
10
+
Setting `suggested_area` in `DeviceInfo`, and passing `suggested_area` to `DeviceRegistry.async_get_or_create` is still supported and influences the area of created devices, although that may change in the future.
11
+
12
+
Use `DeviceEntry.area_id` to determine a device’s area in custom integrations. Don’t access `DeviceEntry.suggested_area`.
13
+
14
+
During the deprecation period, accessing `DeviceEntry.suggested_area` will log a warning.
15
+
16
+
For more details, refer to the [DeviceEntry documentation](/docs/device_registry_index#device-properties) and core [PR 149730](https://github.com/home-assistant/core/pull/149730) which deprecated `DeviceEntry.suggested_area`.
Copy file name to clipboardExpand all lines: docs/device_registry_index.md
+60-1Lines changed: 60 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,6 @@ Although not currently available, we could consider offering an option to users
42
42
| model | The model name of the device. |
43
43
| model_id | The model identifier of the device. |
44
44
| serial_number | The serial number of the device. Unlike a serial number in the `identifiers` set, this does not need to be unique. |
45
-
| suggested_area | The suggested name for the area where the device is located. |
46
45
| sw_version | The firmware version of the device. |
47
46
| via_device | Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant. |
48
47
@@ -56,6 +55,31 @@ Entity device info is only read if the entity is loaded via a [config entry](con
56
55
Each entity is able to define a device via the `device_info` property. This property is read when an entity is added to Home Assistant via a config entry. A device will be matched up with an existing device via supplied identifiers or connections, like serial numbers or MAC addresses. If identifiers and connections are provided, the device registry will first try to match by identifiers. Each identifier and each connection is matched individually (e.g. only one connection needs to match to be considered the same device).
57
56
58
57
```python
58
+
# Definition of DeviceInfo TypedDict
59
+
classDeviceInfo(TypedDict, total=False):
60
+
"""Entity device information for device registry."""
61
+
62
+
configuration_url: str|URL|None
63
+
connections: set[tuple[str, str]]
64
+
created_at: str
65
+
default_manufacturer: str
66
+
default_model: str
67
+
default_name: str
68
+
entry_type: DeviceEntryType |None
69
+
identifiers: set[tuple[str, str]]
70
+
manufacturer: str|None
71
+
model: str|None
72
+
model_id: str|None
73
+
modified_at: str
74
+
name: str|None
75
+
serial_number: str|None
76
+
suggested_area: str|None
77
+
sw_version: str|None
78
+
hw_version: str|None
79
+
translation_key: str|None
80
+
translation_placeholders: Mapping[str, str] |None
81
+
via_device: tuple[str, str]
82
+
59
83
# Inside a platform
60
84
classHueLight(LightEntity):
61
85
@property
@@ -82,6 +106,41 @@ Besides device properties, `device_info` can also include `default_manufacturer`
82
106
Components are also able to register devices in the case that there are no entities representing them. An example is a hub that communicates with the lights.
83
107
84
108
```python
109
+
# Definition of DeviceRegistry.async_get_or_create:
0 commit comments