Use dataclass properties in rainmachine discovery (#60578)

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

View File

@ -70,7 +70,7 @@ class RainMachineFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
self, discovery_info: zeroconf.ZeroconfServiceInfo self, discovery_info: zeroconf.ZeroconfServiceInfo
) -> FlowResult: ) -> FlowResult:
"""Handle discovery via zeroconf.""" """Handle discovery via zeroconf."""
ip_address = discovery_info[zeroconf.ATTR_HOST] ip_address = discovery_info.host
self._async_abort_entries_match({CONF_IP_ADDRESS: ip_address}) self._async_abort_entries_match({CONF_IP_ADDRESS: ip_address})
# Handle IP change # Handle IP change