Improve color temp/xy and brightness level feedback.

This commit is contained in:
Koen Kanters
2018-04-25 22:01:53 +02:00
parent bc1e3d68f9
commit c3ca0249c4
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ const converters = {
cmd: 'moveToLevel',
zclData: {
level: value,
transtime: 1,
transtime: 0,
},
}
},
@@ -22,7 +22,7 @@ const converters = {
cmd: 'moveToColorTemp',
zclData: {
colortemp: value,
transtime: 1,
transtime: 0,
},
}
},
@@ -33,7 +33,7 @@ const converters = {
zclData: {
colorx: value.x * 65535,
colory: value.y * 65535,
transtime: 10,
transtime: 0,
},
}
},
+2 -2
View File
@@ -144,8 +144,8 @@ const parsers = [
if (msg.data.data['currentX'] && msg.data.data['currentY']) {
result.color = {
x: msg.data.data['currentX'] / 65535,
y: msg.data.data['currentY'] / 65535,
x: precisionRound(msg.data.data['currentX'] / 65535, 3),
y: precisionRound(msg.data.data['currentY'] / 65535, 3),
}
}