koying / openrgb_ha

OpenRGB integration for Home Assistant
110 stars 16 forks source link

Error: 120 is not a valid ModeDirections #21

Open watzon opened 2 years ago

watzon commented 2 years ago

No idea why this is happening. Fairly fresh HASS install, new OpenRGB install, and the Home Assistant client shows up in the OpenRGB list of connected clients. The error I'm getting:

This error originated from a custom integration.

Logger: aiohttp.server
Source: custom_components/openrgb/config_flow.py:24
Integration: OpenRGB (documentation, issues)
First occurred: 10:39:43 AM (3 occurrences)
Last logged: 11:02:59 AM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/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 222, 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 79, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 205, in post
    return await super().post(request, flow_id)
  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 109, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 260, 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/openrgb/config_flow.py", line 76, in async_step_user
    await asyncio.wait_for(
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/openrgb/config_flow.py", line 24, in _try_connect
    conn = OpenRGBClient(_host, _port, name=_client_id)
  File "/usr/local/lib/python3.9/site-packages/openrgb/orgb.py", line 287, in __init__
    self.comms.requestDeviceNum()
  File "/usr/local/lib/python3.9/site-packages/openrgb/network.py", line 188, in requestDeviceNum
    self.read()
  File "/usr/local/lib/python3.9/site-packages/openrgb/network.py", line 116, in read
    self.callback(device_id, packet_type, buff[0])
  File "/usr/local/lib/python3.9/site-packages/openrgb/orgb.py", line 302, in _callback
    self.comms.requestDeviceData(x)
  File "/usr/local/lib/python3.9/site-packages/openrgb/network.py", line 181, in requestDeviceData
    self.read()
  File "/usr/local/lib/python3.9/site-packages/openrgb/network.py", line 137, in read
    self.callback(device_id, packet_type, utils.ControllerData.unpack(data, self._protocol_version))
  File "/usr/local/lib/python3.9/site-packages/openrgb/utils.py", line 552, in unpack
    mode = ModeData.unpack(data, version, x)
  File "/usr/local/lib/python3.9/site-packages/openrgb/utils.py", line 336, in unpack
    direction = ModeDirections(direction)
  File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: 120 is not a valid ModeDirections