Abort bond hub config flow if hub is already registered (#38416)

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
This commit is contained in:
Eugene PrystupaandChris Talkington authored and GitHub committed 2020-07-31 14:08:25 +02:00
1 parent 0136c565eb
commit 89cbcdb9dc
5 files changed
+48 -3

No files matched your search

@@ -57,6 +57,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
errors["base"] = "unknown"
else:
await self.async_set_unique_id(bond_id)
self._abort_if_unique_id_configured()
return self.async_create_entry(title=bond_id, data=user_input)
return self.async_show_form(