Fix Daikin config flow for zeroconf devices (#36571)

This commit is contained in:
Fredrik Erlandsson 2020-06-10 15:04:59 +02:00 committed by GitHub
parent 212b9df87d
commit fa17e6d5ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View file

@ -40,8 +40,8 @@ class FlowHandler(config_entries.ConfigFlow):
async def _create_entry(self, host, mac, key=None, uuid=None, password=None):
"""Register new entry."""
# Check if mac already is registered
await self.async_set_unique_id(mac)
if not self.unique_id:
await self.async_set_unique_id(mac)
self._abort_if_unique_id_configured()
return self.async_create_entry(