Use dataclass properties in daikin discovery (#60589)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
40a814221c
commit
9b92787d59
1 changed files with 3 additions and 3 deletions
|
@ -130,15 +130,15 @@ class FlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
) -> FlowResult:
|
||||
"""Prepare configuration for a discovered Daikin device."""
|
||||
_LOGGER.debug("Zeroconf user_input: %s", discovery_info)
|
||||
devices = Discovery().poll(ip=discovery_info[zeroconf.ATTR_HOST])
|
||||
devices = Discovery().poll(ip=discovery_info.host)
|
||||
if not devices:
|
||||
_LOGGER.debug(
|
||||
"Could not find MAC-address for %s,"
|
||||
" make sure the required UDP ports are open (see integration documentation)",
|
||||
discovery_info[zeroconf.ATTR_HOST],
|
||||
discovery_info.host,
|
||||
)
|
||||
return self.async_abort(reason="cannot_connect")
|
||||
await self.async_set_unique_id(next(iter(devices))[KEY_MAC])
|
||||
self._abort_if_unique_id_configured()
|
||||
self.host = discovery_info[zeroconf.ATTR_HOST]
|
||||
self.host = discovery_info.host
|
||||
return await self.async_step_user()
|
||||
|
|
Loading…
Add table
Reference in a new issue