Deadolus / ha-beurer

Home Assistant integration for BLE based Beurer
MIT License
12 stars 5 forks source link

Error "config flow could not be loaded..." when attempting to setup the integration #8

Closed datbilling closed 1 month ago

datbilling commented 10 months ago

I've installed this via HACS, then gone to setup the integration. It results in error config flow could not be loaded : 500 internal server error server got itself into trouble though.

This is on the latest Home Assistant 2023.11.2

image

LandOfDodd commented 9 months ago

I am experiencing this same issue unfortunately (2023.11.3)

Here is the error from my log file:

2023-11-24 10:57:03.864 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/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 85, 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/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin return await func(self, request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 147, in post return await super().post(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 71, in post result = await self._flow_mgr.async_init( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 880, in async_init flow, result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 908, in _async_init result = await self._async_handle_step(flow, flow.init_step, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 389, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/beurer/config_flow.py", line 37, in async_step_user devices = await discover() ^^^^^^^^^^^^^^^^ File "/config/custom_components/beurer/beurer.py", line 17, in discover return [device for device in devices if device.name.lower().startswith("tl100")] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/beurer/beurer.py", line 17, in <listcomp> return [device for device in devices if device.name.lower().startswith("tl100")] ^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'lower'

datbilling commented 9 months ago

Could this be due to the "config" folder being renamed to "homeassistant" in the latest version of HA? I see in the log it is still referring to files in the config folder.

LandOfDodd commented 9 months ago

A number of Bluetooth devices being discovered during the scan at my location did not have a name, which was causing this to fail.