在http://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf这个网站用百度翻译,看到这一段,
Method: Usage: Parameters:
set_ct_abx
This method is used to change the color temperature of a smart LED.
3.
“ct_value” is the target color temperature. The type is integer and
range is 1700 ~ 6500 (k).
“effect” support two values: “sudden” and “smooth”. If effect is “sudden”,
then the color temperature will be changed directly to target value, under this case, the third parameter “duration” is ignored. If effect is “smooth”, then the color temperature will be changed to target value in a gradual fashion, under this case, the total time of gradual change is specified in third parameter “duration”.
“duration” specifies the total time of the gradual changing. The unit is milliseconds. The minimum support duration is 30 milliseconds.
Request Example: {“id”:1,“method”:“set_ct_abx”,“params”:[3500, “smooth”, 500]} Response Example: {“id”:1, “result”:[“ok”]}
NOTE: Only accepted if the smart LED is currently in “on” state.
翻译后:方法:用法:参数:
set_ct_abx
此方法用于改变智能LED的色温。
三.
“ct_value”目标色温。类型是整数和
范围为1700~6500(k)。
“效果”支持两个值:“突然”和“顺利”。如果效果是“突然的”,
然后颜色温度将直接改变为目标值,在这种情况下,第三参数“持续时间”被忽略。如果效果是“平滑的”,那么颜色温度将逐渐改变为目标值,在这种情况下,渐变的总时间是在第三个参数“持续时间”中指定的。
“持续时间”指定渐变的总时间。单位是毫秒。最低支持的持续时间是30毫秒。
请求的例子:{“id”:1、“法”:“set_ct_abx”、“params”:[ 3500,500 ] }“光滑”,响应的例子:{“id”:1,“结果”:[“OK”] }
注意:只有在智能LED处于“开启”状态时才被接受。
如何修改homebridge插件,来让iPhone上的“Home”应用可以调节米家台灯的色温,我现在只能调节亮度,怎么办?