StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
621 stars 111 forks source link

[BUG] TypeError during UI setup #496

Open Ernst79 opened 3 years ago

Ernst79 commented 3 years ago

Environment

Describe the bug

I've bought an Shelly Plus S, updated to the 20201128-102943/v1.9.2@e83f7025 firmware. Configuring the integration fails however with and endless "please wait while the integration is being installed". See below for the error message.

Steps to Reproduce

Restarting HA doesn't help

Expected behavior

Installation of device

Screenshots

Traceback/Error logs

2020-12-15 21:58:45 ERROR (MainThread) [aiohttp.server] 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/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 155, 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 248, in _async_handle_step
result = await self.async_finish_flow(flow, dict(result))
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 498, in async_finish_flow
entry = ConfigEntry(
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 159, in __init__
self.data = MappingProxyType(data)
TypeError: mappingproxy() argument must be a mapping, not NoneType

Additional context

Ernst79 commented 3 years ago

Adding it via Add integration did work. The failing auto discovered integration is however still displayed. After a restart, the failing autodiscovered integration is removed and the manually added one is displayed. So, my problem is solved. However, there seems to be an issue with a clean installation and the configuration in the UI from a auto discovered item.

SuperCocov9 commented 3 years ago

Fresh installed home assistant, hacs and shellyforhass through hacs. When I try to add integration, it stay for hours saying wait until this integration is being installed and nothing happens. Sorry about my English.

sungkhum commented 3 years ago

I got the "please wait while the integration is being installed" message forever as well, but when I just exited and reloaded Home Assistant, all my Shelly devices were there and everything seems to be working.

haukebruno commented 2 years ago

I had the same issue. After adding shelly: manually to configuration.yaml the error disappeared.

I'm not sure if it possible to move the configuration to the database (there is a toggle for that in the integration), since I just want to use the YAML stuff.