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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue