core: Lg soundbar issue adding won't work
The problem
When adding lg soundbar via the user interface, i get an unknown error. Loves show this:
`Logger: aiohttp.server Source: components/lg_soundbar/config_flow.py:36 First occurred: 07:10:57 (5 occurrences) Last logged: 07:16:52
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 82, 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 136, in handle result = await result File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 177, in post return await super().post(request, flow_id) File “/usr/src/homeassistant/homeassistant/components/http/data_validator.py”, line 73, in wrapper result = await method(view, request, data, *args, **kwargs) File “/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py”, line 109, in post result = await self._flow_mgr.async_configure(flow_id, data) File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 277, in async_configure result = await self._async_handle_step( File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 359, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File “/usr/src/homeassistant/homeassistant/components/lg_soundbar/config_flow.py”, line 56, in async_step_user details = await self.hass.async_add_executor_job( File “/usr/local/lib/python3.10/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) File “/usr/src/homeassistant/homeassistant/components/lg_soundbar/config_flow.py”, line 36, in test_connect details = {“name”: name_q.get(timeout=10), “uuid”: uuid_q.get(timeout=10)} File “/usr/local/lib/python3.10/queue.py”, line 179, in get raise Empty _queue.Empty `
What version of Home Assistant Core has the issue?
2022.8.7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Lg soundbar
Link to integration documentation on our website
https://www.home-assistant.io/integrations/lg_soundbar
Diagnostics information
Logger: aiohttp.server Source: components/lg_soundbar/config_flow.py:36 First occurred: 07:10:57 (5 occurrences) Last logged: 07:16:52
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 82, 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 136, in handle result = await result File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 177, in post return await super().post(request, flow_id) File “/usr/src/homeassistant/homeassistant/components/http/data_validator.py”, line 73, in wrapper result = await method(view, request, data, *args, **kwargs) File “/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py”, line 109, in post result = await self._flow_mgr.async_configure(flow_id, data) File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 277, in async_configure result = await self._async_handle_step( File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 359, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File “/usr/src/homeassistant/homeassistant/components/lg_soundbar/config_flow.py”, line 56, in async_step_user details = await self.hass.async_add_executor_job( File “/usr/local/lib/python3.10/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) File “/usr/src/homeassistant/homeassistant/components/lg_soundbar/config_flow.py”, line 36, in test_connect details = {“name”: name_q.get(timeout=10), “uuid”: uuid_q.get(timeout=10)} File “/usr/local/lib/python3.10/queue.py”, line 179, in get raise Empty _queue.Empty
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (12 by maintainers)
Commits related to this issue
- Create a UUID from given device name (home-assistant#77524) * If soundbar API provides no UUID in the responses, one is created based on the name the user gives the device. * Check for dictionary k... — committed to chrismccurdy/home-assistant by chrismccurdy 2 years ago
- Create a UUID from given device name (home-assistant#77524) * If soundbar API provides no UUID in the responses, one is created based on the name the user gives the device. * Check for dictionary k... — committed to chrismccurdy/home-assistant by chrismccurdy 2 years ago
- Create a UUID from given LG soundbar device name (#81918) Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Fixes https://github.com/home-assistant/core/issues/77524 fixes undefined — committed to home-assistant/core by chrismccurdy 2 years ago
The easiest way to test is to copy all the files from the
lg_soundbar
integration to a custom component with the same name and make the changes there. The custom component will have priority over the core component.There’s one pitfall: the manifest of the
lg_soundbar
integration needs to be updated to meet the requirements of the custom component or it won’t be loaded as explained here: https://community.home-assistant.io/t/how-to-create-a-custom-component-out-of-an-existing-component/114778/8@chrismccurdy FYI