Use dataclass properties in shelly discovery (#60593)

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

View file

@ -189,7 +189,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self, discovery_info: zeroconf.ZeroconfServiceInfo
) -> FlowResult:
"""Handle zeroconf discovery."""
host = discovery_info[zeroconf.ATTR_HOST]
host = discovery_info.host
try:
self.info = await self._async_get_info(host)
except HTTP_CONNECT_ERRORS: