diff --git a/homeassistant/components/netgear/__init__.py b/homeassistant/components/netgear/__init__.py index edd4f5782e6..8f81de43ebb 100644 --- a/homeassistant/components/netgear/__init__.py +++ b/homeassistant/components/netgear/__init__.py @@ -213,7 +213,7 @@ async def async_remove_config_entry_device( device_mac = None for connection in device_entry.connections: - if connection[0] == "mac": + if connection[0] == dr.CONNECTION_NETWORK_MAC: device_mac = connection[1] break diff --git a/homeassistant/components/netgear/router.py b/homeassistant/components/netgear/router.py index 3e285f998a1..98958fbbb9b 100644 --- a/homeassistant/components/netgear/router.py +++ b/homeassistant/components/netgear/router.py @@ -19,7 +19,6 @@ from homeassistant.const import ( ) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import device_registry as dr -from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, format_mac from homeassistant.helpers.entity import DeviceInfo, Entity from homeassistant.helpers.update_coordinator import ( CoordinatorEntity, @@ -204,7 +203,7 @@ class NetgearRouter: if ntg_device.mac is None: continue - device_mac = format_mac(ntg_device.mac) + device_mac = dr.format_mac(ntg_device.mac) if not self.devices.get(device_mac): new_device = True @@ -336,7 +335,7 @@ class NetgearDeviceEntity(NetgearBaseEntity): def device_info(self) -> DeviceInfo: """Return the device information.""" return DeviceInfo( - connections={(CONNECTION_NETWORK_MAC, self._mac)}, + connections={(dr.CONNECTION_NETWORK_MAC, self._mac)}, default_name=self._device_name, default_model=self._device["device_model"], via_device=(DOMAIN, self._router.unique_id),