deCONZ - retry if setup fails (#17772)

* Make component retry if setup fails
* Improve overall test coverage
This commit is contained in:
Robert Svensson 2018-10-31 22:38:04 +01:00 committed by GitHub
parent 145677ed75
commit a9140dc8f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 823 additions and 475 deletions

View file

@ -35,10 +35,6 @@ class DeconzFlowHandler(config_entries.ConfigFlow):
self.deconz_config = {}
async def async_step_user(self, user_input=None):
"""Handle a flow initialized by the user."""
return await self.async_step_init(user_input)
async def async_step_init(self, user_input=None):
"""Handle a deCONZ config flow start.
Only allows one instance to be set up.
@ -67,7 +63,7 @@ class DeconzFlowHandler(config_entries.ConfigFlow):
for bridge in self.bridges:
hosts.append(bridge[CONF_HOST])
return self.async_show_form(
step_id='init',
step_id='user',
data_schema=vol.Schema({
vol.Required(CONF_HOST): vol.In(hosts)
})