-
-
Notifications
You must be signed in to change notification settings - Fork 773
Description
Device model / 设备型号
yeelink.light.colorc
Component version / 插件版本
1.0.17
HA core version / HA版本
2025.4.3
Integrated mode / 集成方式
Automatic (自动模式)
The problem / 问题详情
IndexError: tuple index out of range when changing yeelight color bulbs color. This is happening since the last core update.
2025-04-20 19:55:58.100 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140235913585008] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 648, 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 182, in async_turn_on
await self.hass.services.async_call(
...<5 lines>...
)
File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1032, in entity_service_call
raise result from None
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1628, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 648, in async_handle_light_on_service
await light.async_turn_on(**filter_turn_on_params(light, params))
File "/config/custom_components/xiaomi_miot/light.py", line 156, in async_turn_on
await self.device.async_write(dat)
File "/config/custom_components/xiaomi_miot/core/device.py", line 701, in async_write
data = self.encode(payload)
File "/config/custom_components/xiaomi_miot/core/device.py", line 696, in encode
conv.encode(self, payload, v)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_miot/core/converters.py", line 240, in encode
super().encode(device, payload, MiotRgbColorConv.rgb_to_int(rgb))
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/config/custom_components/xiaomi_miot/core/converters.py", line 244, in rgb_to_int
num = int(rgb[0]) << 16 | int(rgb[1]) << 8 | int(rgb[3])
~~~^^^
IndexError: tuple index out of range
Entity attributes / 实体属性
min_color_temp_kelvin: 2700
max_color_temp_kelvin: 6500
min_mireds: 153
max_mireds: 370
effect_list:
- Color
- Ct
supported_color_modes:
- color_temp
- rgb
effect: Ct
color_mode: color_temp
brightness: 145.35
color_temp_kelvin: 5233
color_temp: 191
hs_color:
- 27.317
- 16.168
rgb_color:
- 255
- 233
- 214
xy_color:
- 0.362
- 0.347
light.color_temperature: 5233
light.brightness: 57
light.on: true
light.color: 36863
light.mode: 2
friendly_name: Spot Kád
supported_features: 4
Home Assistant Logs / 系统日志
No response