Skip to content

更新0.3.2后,M1S的灯光功能仍不正常 #346

@heyggu

Description

@heyggu

你好,不能控制M1S灯光的开关和调色。
Logs:

TypeError: unsupported operand type(s) for /: 'tuple' and 'int'
2025-06-03 16:47:46.063 WARNING (MainThread) [custom_components.aqara_gateway.core.gateway] Unsupported cmd: {'cmd': 'behave', 'data': {'blue': 0, 'duration': -1, 'green': 0, 'off_period': 200, 'on_period': 100, 'persist': False, 'post_delay': 200, 'pre_delay': 200, 'red': 77, 'repeat': 3}, 'id': 256, 'type': 'rgb', 'ver': 1}
2025-06-03 16:47:47.295 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback Gateway._on_message() (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
self._context.run(self._callback, *self._args)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/aqara_gateway/core/gateway.py", line 537, in _on_message
self._process_message(payload)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/config/custom_components/aqara_gateway/core/gateway.py", line 668, in _process_message
handler(payload)
~~~~~~~^^^^^^^^^
File "/config/custom_components/aqara_gateway/light.py", line 135, in update
x_val = float(data[ATTR_RGB_COLOR] / (2**16))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions