Improve UniFi config flow tests and add options flow test (#27340)

This commit is contained in:
Robert Svensson 2019-10-08 23:44:33 +02:00 committed by Paulus Schoutsen
parent 7f20210e93
commit d345b58ce6
4 changed files with 268 additions and 177 deletions

View file

@ -150,12 +150,6 @@ class UnifiFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
self.desc = next(iter(self.sites.values()))["desc"]
return await self.async_step_site(user_input={})
if self.desc is not None:
for site in self.sites.values():
if self.desc == site["name"]:
self.desc = site["desc"]
return await self.async_step_site(user_input={})
sites = []
for site in self.sites.values():
sites.append(site["desc"])