Use dataclass properties in devolo_home_control discovery (#60600)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/60610/head
epenet 2021-11-30 10:08:55 +01:00 committed by GitHub
parent 0bb44c042c
commit a32a748cec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ class DevoloHomeControlFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
) -> FlowResult:
"""Handle zeroconf discovery."""
# Check if it is a gateway
if discovery_info[zeroconf.ATTR_PROPERTIES].get("MT") in SUPPORTED_MODEL_TYPES:
if discovery_info.properties.get("MT") in SUPPORTED_MODEL_TYPES:
await self._async_handle_discovery_without_unique_id()
return await self.async_step_zeroconf_confirm()
return self.async_abort(reason="Not a devolo Home Control gateway.")