register a device and its entities in home assistant's device registry from a custom integration

domain: developers.home-assistant.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. In each entity class, implement the device_info property returning identifying info (e.g. identifiers or connections like a MAC address, plus name/model/manufacturer).
  2. Ensure each entity also sets a stable unique_id so it gets tracked in the entity registry and keeps the same entity ID across restarts.
  3. Rely on Home Assistant to automatically group entities sharing the same device_info identifiers under a single device in the device registry.
  4. Implement async_remove_config_entry_device in __init__.py if you want to let users manually delete a stale device from the UI.
  5. Confirm the device and its entities appear correctly under Settings > Devices & Services > Devices after a reload.

Known gotchas

Related routes

Integrate a custom device into Home Assistant using MQTT discovery so it appears automatically without manual YAML configuration
home-assistant.io · 6 steps · unrated
Configure ESPHome with native API and integrate a custom sensor device with Home Assistant using device substitutions and packages
esphome.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans