diff --git a/homeassistant/components/axis/device.py b/homeassistant/components/axis/device.py index 93d90e93fe2..823593ecacb 100644 --- a/homeassistant/components/axis/device.py +++ b/homeassistant/components/axis/device.py @@ -172,6 +172,7 @@ class AxisNetworkDevice: device_registry = dr.async_get(self.hass) device_registry.async_get_or_create( config_entry_id=self.config_entry.entry_id, + configuration_url=self.api.config.url, connections={(CONNECTION_NETWORK_MAC, self.unique_id)}, identifiers={(AXIS_DOMAIN, self.unique_id)}, manufacturer=ATTR_MANUFACTURER, diff --git a/tests/components/axis/test_device.py b/tests/components/axis/test_device.py index a68fa50a093..2d2ba83f633 100644 --- a/tests/components/axis/test_device.py +++ b/tests/components/axis/test_device.py @@ -26,6 +26,7 @@ from homeassistant.const import ( STATE_ON, STATE_UNAVAILABLE, ) +from homeassistant.helpers import device_registry as dr from tests.common import MockConfigEntry, async_fire_mqtt_message @@ -323,6 +324,13 @@ async def test_device_setup(hass): assert device.name == ENTRY_CONFIG[CONF_NAME] assert device.unique_id == FORMATTED_MAC + device_registry = dr.async_get(hass) + device_entry = device_registry.async_get_device( + identifiers={(AXIS_DOMAIN, device.unique_id)} + ) + + assert device_entry.configuration_url == device.api.config.url + async def test_device_info(hass): """Verify other path of device information works."""