Danielhiversen / flux_led

A utility for controlling Flux WiFi Smart LED Light Bulbs
GNU Lesser General Public License v3.0
158 stars 144 forks source link

Fix exception when device 2x about strip config #221

Closed bdraco closed 2 years ago

bdraco commented 2 years ago

Fixes


2021-12-08 10:33:10 ERROR (MainThread) [homeassistant] Error doing job: Fatal error: protocol.data_received() call failed.
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/selector_events.py", line 870, in _read_ready__data_received
    self._protocol.data_received(data)
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/flux_led/aioprotocol.py", line 57, in data_received
    self._data_receive_callback(data)
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/flux_led/aiodevice.py", line 359, in _async_data_recieved
    self._async_process_message(msg)
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/flux_led/aiodevice.py", line 384, in _async_process_message
    self.process_ic_response(msg)
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/flux_led/aiodevice.py", line 416, in process_ic_response
    self._ic_future.set_result(True)
asyncio.exceptions.InvalidStateError: invalid state
2021-12-08 10:33:10 DEBUG (MainThread) [flux_led.aioprotocol] (192.168.106.60, 5577): Connection lost: invalid state```