Expose deCONZ configuration url from discovered entry (#64519)
This commit is contained in:
parent
7d66d4c219
commit
3258f66097
4 changed files with 24 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue