Expose deCONZ configuration url from discovered entry (#64519)

This commit is contained in:
Robert Svensson 2022-01-20 13:46:22 +01:00 committed by GitHub
parent 7d66d4c219
commit 3258f66097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 2 deletions

View file

@ -33,6 +33,7 @@ from .const import (
CONF_BRIDGE_ID,
DEFAULT_PORT,
DOMAIN,
HASSIO_CONFIGURATION_URL,
LOGGER,
)
from .gateway import DeconzGateway, get_gateway_from_config_entry
@ -227,7 +228,12 @@ class DeconzFlowHandler(ConfigFlow, domain=DOMAIN):
updates={CONF_HOST: hostname, CONF_PORT: port}
)
self.context["title_placeholders"] = {"host": hostname}
self.context.update(
{
"title_placeholders": {"host": hostname},
"configuration_url": f"http://{hostname}:{port}",
}
)
self.deconz_config = {CONF_HOST: hostname, CONF_PORT: port}
@ -251,6 +257,8 @@ class DeconzFlowHandler(ConfigFlow, domain=DOMAIN):
}
)
self.context["configuration_url"] = HASSIO_CONFIGURATION_URL
self._hassio_discovery = discovery_info.config
return await self.async_step_hassio_confirm()