mirror of
https://github.com/home-assistant/core
synced 2024-08-02 23:40:32 +02:00
Use dataclass properties in lookin discovery (#60585)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
2f79760fb4
commit
071296865b
@ -31,8 +31,8 @@ class LookinFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
self, discovery_info: zeroconf.ZeroconfServiceInfo
|
||||
) -> FlowResult:
|
||||
"""Start a discovery flow from zeroconf."""
|
||||
uid: str = discovery_info[zeroconf.ATTR_HOSTNAME][: -len(".local.")]
|
||||
host: str = discovery_info[zeroconf.ATTR_HOST]
|
||||
uid: str = discovery_info.hostname[: -len(".local.")]
|
||||
host: str = discovery_info.host
|
||||
await self.async_set_unique_id(uid.upper())
|
||||
self._abort_if_unique_id_configured(updates={CONF_HOST: host})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user