Abort rachio homekit config when one is already setup (#33285)
* Abort rachio homekit config when one is already setup. We can see rachio on the network to tell them to configure it, but since the device will not give up the account it is bound to and there can be multiple rachio controllers on a single account, we avoid showing the device as discovered once they already have one configured as they can always add a new one via "+" * doc string freshness * doc string freshness * Update tests/components/rachio/test_config_flow.py Co-Authored-By: Franck Nijhof <git@frenck.dev> Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
1 parent
b8afb9277a
commit
f5a6c3484d
2 files changed
+30
No files matched your search
@@ -84,6 +84,14 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
|
||||
async def async_step_homekit(self, homekit_info):
|
||||
"""Handle HomeKit discovery."""
|
||||
if self._async_current_entries():
|
||||
# We can see rachio on the network to tell them to configure
|
||||
# it, but since the device will not give up the account it is
|
||||
# bound to and there can be multiple rachio systems on a single
|
||||
# account, we avoid showing the device as discovered once
|
||||
# they already have one configured as they can always
|
||||
# add a new one via "+"
|
||||
return self.async_abort(reason="already_configured")
|
||||
return await self.async_step_user()
|
||||
|
||||
async def async_step_import(self, user_input):
|
||||
|
||||
Reference in new issue
Block a user