Local Tuya - Button shows light as on after turn off

Hi together,

I‘m pretty new to HomeAssistant. I have the problem, that if I change the color of a lightgroup (only this specific group and only with localtuya) and then turning it off, the button for this group is still turned on.

I also noticed, that if I wanted to use my „IKEA E2002“ (Zigbee2Mqtt) to cycle the colors of this light group, one lamp would never change its color.

Could you help me to solve this issue with the lightgroup? I believe that both problems are connected somehow.

If I should provide further information, please let me know.

Here is the log:


Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/localtuya/light.py:345 
Integration: Home Assistant WebSocket API (documentation, issues) 
First occurred: 21:05:04 (9 occurrences) 
Last logged: 21:51:08

[140237799741840] 'NoneType' object is not subscriptable
[140239236485648] 'NoneType' object is not subscriptable
[140235072545856] 'NoneType' object is not subscriptable
[140239683173200] 'NoneType' object is not subscriptable
[140239267004720] 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 198, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 686, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 726, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 572, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/group/light.py", line 179, in async_turn_on
    await self.hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 686, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 726, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 572, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/config/custom_components/localtuya/light.py", line 345, in async_turn_on
    round(self._hs[0]), round(self._hs[1] * 10.0), brightness
TypeError: 'NoneType' object is not subscriptable

All the Best,

Thomas