angoyd / freshintelliventHacs

Integration of Fresh Intellivent Sky for Home Assistant.
MIT License
12 stars 2 forks source link

Fix config flow `no_auth` #27

Closed LaStrada closed 1 year ago

LaStrada commented 1 year ago

When selecting an option (AUTH_FETCH, AUTH_MANUAL or NO_AUTH) it automatically jumps to async_step_<step> and will never execute the old code to check what the user selected.

The error I got:

ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/Users/stale/private_projects/ha/core/venv/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/Users/stale/private_projects/ha/core/venv/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/Users/stale/private_projects/ha/core/venv/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/Users/stale/private_projects/ha/core/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/Users/stale/private_projects/ha/core/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/Users/stale/private_projects/ha/core/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/Users/stale/private_projects/ha/core/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
  File "/Users/stale/private_projects/ha/core/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/Users/stale/private_projects/ha/core/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/Users/stale/private_projects/ha/core/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/Users/stale/private_projects/ha/core/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/Users/stale/private_projects/ha/core/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/Users/stale/private_projects/ha/core/homeassistant/data_entry_flow.py", line 249, in async_configure
    result = await self._async_handle_step(
  File "/Users/stale/private_projects/ha/core/homeassistant/data_entry_flow.py", line 330, in _async_handle_step
    raise UnknownStep(
homeassistant.data_entry_flow.UnknownStep: Handler FreshIntelliventSkyConfigFlow doesn't support step no_auth