mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-28 05:24:29 +00:00
lightingColorCtrl parser support currentX/Y
This commit is contained in:
@@ -135,7 +135,22 @@ const parsers = [
|
||||
devices: ['LED1545G12', '7146060PH', 'LED1537R6'],
|
||||
cid: 'lightingColorCtrl',
|
||||
type: 'devChange',
|
||||
convert: (msg) => {return {color_temp: msg.data.data['colorTemperature']}},
|
||||
convert: (msg) => {
|
||||
const result = {};
|
||||
|
||||
if (msg.data.data['colorTemperature']) {
|
||||
result.color_temp = msg.data.data['colorTemperature'];
|
||||
}
|
||||
|
||||
if (msg.data.data['currentX'] && msg.data.data['currentY']) {
|
||||
result.color = {
|
||||
x: msg.data.data['currentX'] / 65535,
|
||||
y: msg.data.data['currentY'] / 65535,
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
},
|
||||
{
|
||||
devices: ['WXKG11LM'],
|
||||
|
||||
Reference in New Issue
Block a user