Skip to main content
Devices represent physical hardware in your smart home. They serve as a logical grouping for related entities and provide a way to organize and manage your smart home components.

What is a Device?

A device is a physical piece of hardware that can have one or more entities associated with it. For example, a smart thermostat device might have:
  • A climate entity for temperature control
  • A temperature sensor entity
  • A humidity sensor entity
  • A battery sensor entity
Devices help organize entities and provide context about the hardware they represent.

Device Registry

The device registry (homeassistant/helpers/device_registry.py) maintains information about all devices in Home Assistant. It provides:
  • Persistent storage of device information
  • Unique device identification
  • Device-to-config-entry relationships
  • Area assignment
  • Device metadata (manufacturer, model, firmware version)

Device Entry Structure

Each device in the registry has a DeviceEntry with the following key attributes:

Key Properties

Device Identification

Devices are identified using one or both of these methods:

Identifiers

Domain-specific unique identifiers:

Connections

Physical connection identifiers:
MAC addresses in connections are automatically normalized to lowercase with colons as separators.

DeviceInfo

Integrations provide device information using the DeviceInfo TypedDict:

Creating or Updating Devices

Devices are typically created automatically when entities are registered, but you can also create them explicitly:

Device Types

Devices can have different entry types:
Service devices represent software services rather than physical hardware (e.g., weather services, APIs).

Device Relationships

Hub Devices

Devices can be connected through a hub using via_device:

Area Assignment

Devices can be assigned to areas for logical grouping:

Device Disabling

Devices can be disabled through several mechanisms:
When a device is disabled, all its entities are also disabled.

Configuration URL

Devices can provide a URL to their configuration interface:
Supported URL schemes:
  • http://
  • https://
  • homeassistant://

Retrieving Devices

Deleted Devices

When devices are removed, they’re moved to a deleted devices collection and can be restored if the same device is discovered again:

Best Practices

Unique Identification

Always provide unique identifiers or connections that persist across device resets and Home Assistant restarts.

Meaningful Names

Provide clear manufacturer, model, and device names to help users identify their devices.

Version Information

Include software and hardware version information when available for diagnostics and troubleshooting.

Hub Relationships

Use via_device to properly represent hub-connected devices for better organization.

Connection Types

Common connection types:

Example: Complete Device Setup

Entities

Learn about entities and their relationship to devices

Config Entries

Understand how devices relate to config entries