diff --git a/homeassistant/components/deconz/gateway.py b/homeassistant/components/deconz/gateway.py index fd18be76011..679c1498e44 100644 --- a/homeassistant/components/deconz/gateway.py +++ b/homeassistant/components/deconz/gateway.py @@ -152,7 +152,7 @@ class DeconzGateway: # Gateway service configuration_url = f"http://{self.host}:{self.config_entry.data[CONF_PORT]}" if self.config_entry.source == SOURCE_HASSIO: - configuration_url = None + configuration_url = "homeassistant://hassio/ingress/core_deconz" device_registry.async_get_or_create( config_entry_id=self.config_entry.entry_id, configuration_url=configuration_url, diff --git a/tests/components/deconz/test_gateway.py b/tests/components/deconz/test_gateway.py index 2cb73102bf1..8016d2327ef 100644 --- a/tests/components/deconz/test_gateway.py +++ b/tests/components/deconz/test_gateway.py @@ -179,7 +179,7 @@ async def test_gateway_setup(hass, aioclient_mock): assert gateway_entry.entry_type == "service" -async def test_gateway_device_no_configuration_url_when_addon(hass, aioclient_mock): +async def test_gateway_device_configuration_url_when_addon(hass, aioclient_mock): """Successful setup.""" with patch( "homeassistant.config_entries.ConfigEntries.async_forward_entry_setup", @@ -195,7 +195,9 @@ async def test_gateway_device_no_configuration_url_when_addon(hass, aioclient_mo identifiers={(DECONZ_DOMAIN, gateway.bridgeid)} ) - assert not gateway_entry.configuration_url + assert ( + gateway_entry.configuration_url == "homeassistant://hassio/ingress/core_deconz" + ) async def test_gateway_retry(hass):