Fix colorTemperature data and homekit ui demonstrate mismatch #139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
当前版本灯具注册给Homebridge的set回调中,在解析ColorTemperature参数时,Homebridge的参数范围是140(白光)~500(黄光),而涂鸦iot平台中灯具类目的色温参数范围是0(黄光)~1000(白光),故存在在homekit app中设置白光时,插件将数据值解析为涂鸦平台的黄光,反之亦然。此处修改数据解析规则,从将原数据映射后加上最小值的计算方法修改为从最大值减去映射后的原数据值。本地测试成功。
animation.mp4
#136