Add configuration_url to deCONZ device when entry source is addon (#59598)
This commit is contained in:
parent
c6c8c1293f
commit
2ca874a15c
2 changed files with 5 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue