Abort flux_led discovery if another device gets the ip (#61074)
- If the dhcp reservation expired for the device that was at the ip and a new flux_led device appears we would discover it because the unique_id did not match
This commit is contained in:
parent
40b99135e5
commit
52d6b83da8
2 changed files with 33 additions and 2 deletions
|
@ -115,8 +115,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
await self.async_set_unique_id(mac)
|
||||
self._abort_if_unique_id_configured(updates={CONF_HOST: host})
|
||||
for entry in self._async_current_entries(include_ignore=False):
|
||||
if entry.data[CONF_HOST] == host and not entry.unique_id:
|
||||
async_update_entry_from_discovery(self.hass, entry, device)
|
||||
if entry.data[CONF_HOST] == host:
|
||||
if not entry.unique_id:
|
||||
async_update_entry_from_discovery(self.hass, entry, device)
|
||||
return self.async_abort(reason="already_configured")
|
||||
self.context[CONF_HOST] = host
|
||||
for progress in self._async_in_progress():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue