ShellyForHASS: [BUG] Error: Handling request

Environment

  • ShellyForHASS release with the issue: 0.2.0
  • Last working ShellyForHASS release (if known): 0.2.0
  • Home Assistant Core release with the issue: 0.115.0b9
  • Operating environment (Home Assistant/Supervised/Docker/venv): supervised

Describe the bug

When trying to configure the S4H in the integrations panel, the popup shows that its being installed but sits there and never finishes. With debug active, I get the following error:

Log Details (ERROR)
Logger: aiohttp.server
Source: custom_components/shelly/config_flow.py:44
First occurred: 11:32:59 (1 occurrences)
Last logged: 11:32:59

Steps to Reproduce

Install via HACS or manually, same result. Uninstall, reinstall no fix.

Expected behavior

Popup should close after install tasks finish and config form should become available

Screenshots

Image-202009-005

Traceback/Error logs

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    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 160, in get
    return await super().get(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 92, in get
    result = await self._flow_mgr.async_configure(flow_id)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/shelly/config_flow.py", line 44, in async_step_input
    title=user_input["id_prefix"],
TypeError: 'NoneType' object is not subscriptable

Additional context

Possibly self-inflicted, I had tried the new built-in Shelly too before realising that it was a little lite for my needs. I uninstalled that restart and then issues startedsometime after that. Before then I had actually updated to 0.2.0 which had fixed my CoAP warnings and fixed all the latency and associated issues with dimmers etc.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (2 by maintainers)

Most upvoted comments

I have added some code that hopefully takes care of this.