Use ZeroconfServiceInfo in rainmachine (#60055)

This commit is contained in:
epenet 2021-11-21 08:08:45 +01:00 committed by GitHub
parent e056f9aa0f
commit 85b37a8532
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

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