mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-25 12:09:53 +00:00
Improve color temp/xy and brightness level feedback.
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user