I have 1 Alfen configured a couple of weeks ago. I now try to add a second Alfen and when filling in all parameters, I get “an unknown error occured”.
The logs give
Logger: py.warnings
Source: custom_components/alfen_wallbox/alfen.py:70
Integration: Alfen Wallbox (documentation)
First occurred: 11:59:52 (5 occurrences)
Last logged: 12:48:28
/config/custom_components/alfen_wallbox/alfen.py:70: RuntimeWarning: coroutine 'ClientSession._request' was never awaited self._session.request(ssl=self.ssl, method='POST', headers = HEADER_JSON, url=self.__get_url('logout'))
and
Deze fout is ontstaan door een aangepaste integratie.
Logger: aiohttp.server
Source: custom_components/alfen_wallbox/config_flow.py:29
Integration: Alfen Wallbox (documentation)
First occurred: 12:05:25 (3 occurrences)
Last logged: 12:49:06
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 145, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 253, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/alfen_wallbox/config_flow.py", line 65, in async_step_user
return await self._create_device(user_input[CONF_HOST], user_input[CONF_NAME], user_input[CONF_USERNAME], user_input[CONF_PASSWORD])
File "/config/custom_components/alfen_wallbox/config_flow.py", line 52, in _create_device
return await self._create_entry(host, name, username, password)
File "/config/custom_components/alfen_wallbox/config_flow.py", line 29, in _create_entry
if entry.data[KEY_IP] == host:
KeyError: 'ip'