Add Shelly visit device link to discovered devices (#69185)

pull/69191/head
Simone Chemelli 2022-04-03 11:53:25 +02:00 committed by GitHub
parent 69461f115d
commit f8333feb51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -198,7 +198,12 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self._abort_if_unique_id_configured({CONF_HOST: host}) self._abort_if_unique_id_configured({CONF_HOST: host})
self.host = host self.host = host
self.context["title_placeholders"] = {"name": discovery_info.name.split(".")[0]} self.context.update(
{
"title_placeholders": {"name": discovery_info.name.split(".")[0]},
"configuration_url": f"http://{discovery_info.host}",
}
)
if get_info_auth(self.info): if get_info_auth(self.info):
return await self.async_step_credentials() return await self.async_step_credentials()