Add configuration_url to Plugwise discovery (#66047)

pull/66061/head
Franck Nijhof 2022-02-08 03:00:41 +01:00 committed by GitHub
parent 379945860b
commit 895aee3fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 6 deletions

View File

@ -97,12 +97,17 @@ class PlugwiseConfigFlow(ConfigFlow, domain=DOMAIN):
_version = _properties.get("version", "n/a")
_name = f"{ZEROCONF_MAP.get(_product, _product)} v{_version}"
self.context["title_placeholders"] = {
CONF_HOST: discovery_info.host,
CONF_NAME: _name,
CONF_PORT: discovery_info.port,
CONF_USERNAME: self._username,
}
self.context.update(
{
"title_placeholders": {
CONF_HOST: discovery_info.host,
CONF_NAME: _name,
CONF_PORT: discovery_info.port,
CONF_USERNAME: self._username,
},
"configuration_url": f"http://{discovery_info.host}:{discovery_info.port}",
}
)
return await self.async_step_user()
async def async_step_user(