mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Use dataclass properties in broadlink discovery (#60689)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
92e608ce04
commit
2a1f0cadaa
@ -57,8 +57,8 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
self, discovery_info: dhcp.DhcpServiceInfo
|
||||
) -> data_entry_flow.FlowResult:
|
||||
"""Handle dhcp discovery."""
|
||||
host = discovery_info[dhcp.IP_ADDRESS]
|
||||
unique_id = discovery_info[dhcp.MAC_ADDRESS].lower().replace(":", "")
|
||||
host = discovery_info.ip
|
||||
unique_id = discovery_info.macaddress.lower().replace(":", "")
|
||||
await self.async_set_unique_id(unique_id)
|
||||
self._abort_if_unique_id_configured(updates={CONF_HOST: host})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user