From 84e8046943f068b0b592a4feb30200ee934e1719 Mon Sep 17 00:00:00 2001 From: tomaae <23486452+tomaae@users.noreply.github.com> Date: Tue, 4 May 2021 17:15:07 +0200 Subject: [PATCH] Added connections to device registry, fixes #114 --- custom_components/mikrotik_router/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/mikrotik_router/__init__.py b/custom_components/mikrotik_router/__init__.py index 6dd249a..4e216c0 100644 --- a/custom_components/mikrotik_router/__init__.py +++ b/custom_components/mikrotik_router/__init__.py @@ -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"],