Skip to content

Commit

Permalink
Added connections to device registry, fixes #114
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaae committed May 4, 2021
1 parent 59ce061 commit 84e8046
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/mikrotik_router/__init__.py
Expand Up @@ -68,6 +68,7 @@ async def async_setup_entry(hass, config_entry):
device_registry = await hass.helpers.device_registry.async_get_registry()
device_registry.async_get_or_create(
config_entry_id=config_entry.entry_id,
connections={(DOMAIN, controller.data["routerboard"]["serial-number"])},
manufacturer=controller.data["resource"]["platform"],
model=controller.data["routerboard"]["model"],
name=controller.data["routerboard"]["model"],
Expand Down

0 comments on commit 84e8046

Please sign in to comment.