Use dataclass properties in freebox discovery (#60635)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-11-30 16:28:02 +01:00 committed by GitHub
parent a90ef488a1
commit 30bb2c82c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,7 +111,7 @@ class FreeboxFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
self, discovery_info: zeroconf.ZeroconfServiceInfo
) -> FlowResult:
"""Initialize flow from zeroconf."""
zeroconf_properties = discovery_info[zeroconf.ATTR_PROPERTIES]
zeroconf_properties = discovery_info.properties
host = zeroconf_properties["api_domain"]
port = zeroconf_properties["https_port"]
return await self.async_step_user({CONF_HOST: host, CONF_PORT: port})