Optimise use of ZeroconfServiceInfo (#59966)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
ecf00a1eae
commit
e23cc3ecbf
3 changed files with 12 additions and 14 deletions
|
@ -111,6 +111,7 @@ class FreeboxFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
self, discovery_info: zeroconf.ZeroconfServiceInfo
|
||||
) -> FlowResult:
|
||||
"""Initialize flow from zeroconf."""
|
||||
host = discovery_info[zeroconf.ATTR_PROPERTIES]["api_domain"]
|
||||
port = discovery_info[zeroconf.ATTR_PROPERTIES]["https_port"]
|
||||
zeroconf_properties = discovery_info[zeroconf.ATTR_PROPERTIES]
|
||||
host = zeroconf_properties["api_domain"]
|
||||
port = zeroconf_properties["https_port"]
|
||||
return await self.async_step_user({CONF_HOST: host, CONF_PORT: port})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue