I’m running core-2021.1.5 and right after I updated I tried to make a change to the Unifi integration. I had originally set the integration to ‘not’ track devices and later needed to change that back to tracking. Each time I have tried to click ‘Options’ to make the change, I get a “Please wait while the integration is being installed” and it just spins and spins for over an hour. It’s in some kind of loop.
I’m not sure where to report this on Github (I’m not that familiar with how that works).
Logger: aiohttp.server
Source: components/unifi/config_flow.py:179
First occurred: 2:47:59 PM (2 occurrences)
Last logged: 3:09:27 PM
Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py”, line 422, in _handle_request
resp = await self._request_handler(request)
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py”, line 499, in _handle
resp = await handler(request)
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py”, line 118, in impl
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/security_filter.py”, line 56, in security_filter_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 18, in request_context_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 72, in ban_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 127, in auth_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 129, in handle
result = await result
File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 210, in post
return await super().post(request)
File “/usr/src/homeassistant/homeassistant/components/http/data_validator.py”, line 60, in wrapper
result = await method(view, request, *args, **kwargs)
File “/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py”, line 69, in post
result = await self._flow_mgr.async_init(
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 130, in async_init
result = await self._async_handle_step(
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 213, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File “/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py”, line 179, in async_step_init
self.controller = self.hass.data[UNIFI_DOMAIN][self.config_entry.entry_id]
KeyError: ‘…scrubbed…’
I read the documentation about creating a read-only user, which I did. I used that account when setting up the integration while 2FA was running and the integration failed. Once I turned off 2FA, the integration could complete the process. When creating accounts, I don’t see a “local” designation. Do you mean “read-only” when you say “local”? The account was created on the unifi-controller under “Admins”. Did I miss something?
Are you creating the account when logged in to the controller’s user management screen via the direct IP address (rather than via unifi.ui.com)? From my Cloud Key Gen2+, running v2.0.27
A local account will show “Local Access” rather than “Ubiquiti Account”: