From d0fb9941999432f65e79a76b53aa2ad445a1e62a Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Sun, 15 Oct 2023 23:40:06 +0200 Subject: [PATCH] Set Mac as connection to link HomeWizard devices on network (#101944) --- homeassistant/components/homewizard/entity.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/homewizard/entity.py b/homeassistant/components/homewizard/entity.py index 3279c9ba41b..51dbe9fcad3 100644 --- a/homeassistant/components/homewizard/entity.py +++ b/homeassistant/components/homewizard/entity.py @@ -1,8 +1,8 @@ """Base entity for the HomeWizard integration.""" from __future__ import annotations -from homeassistant.const import ATTR_IDENTIFIERS -from homeassistant.helpers.device_registry import DeviceInfo +from homeassistant.const import ATTR_CONNECTIONS, ATTR_IDENTIFIERS +from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import DOMAIN @@ -25,6 +25,10 @@ class HomeWizardEntity(CoordinatorEntity[HWEnergyDeviceUpdateCoordinator]): ) if coordinator.data.device.serial is not None: + self._attr_device_info[ATTR_CONNECTIONS] = { + (CONNECTION_NETWORK_MAC, coordinator.data.device.serial) + } + self._attr_device_info[ATTR_IDENTIFIERS] = { (DOMAIN, coordinator.data.device.serial) }