Closed mplacona closed 2 years ago
Hello, sorry to hear you're having issues. Are you seeing any errors in your logs?
Hey not at all! Thank you so much for creating this and sharing! I'm so happy to try and help you debug this (even though Python is really not what I'm good at 😅). Here's what I get from the logs:
This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/octopus_energy/config_flow.py:146
Integration: Octopus Energy (documentation, issues)
First occurred: 13 October 2021, 15:13:06 (6 occurrences)
Last logged: 15:56:37
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, 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 98, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 192, in post
return await super().post(request)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 72, in post
result = await self._flow_mgr.async_init(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 151, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 177, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data, init_done)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 256, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/octopus_energy/config_flow.py", line 146, in async_step_init
vol.Optional(CONFIG_SMETS1, default=config[CONFIG_SMETS1]): bool,
KeyError: 'SMETS1'
This should now be fixed
Thank you so much for fixing this!
When trying to change the gas configuration by clicking on "configure" in the integration I get "Config flow could not be loaded".