From aebce9099bef2f9abae73ad43ba56372a1797d59 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Fri, 20 Apr 2018 23:40:17 +0200 Subject: [PATCH] Support settings colors. #7 --- lib/converters/mqtt2zigbee.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/converters/mqtt2zigbee.js b/lib/converters/mqtt2zigbee.js index 9c75a981..f3280e35 100644 --- a/lib/converters/mqtt2zigbee.js +++ b/lib/converters/mqtt2zigbee.js @@ -26,6 +26,17 @@ const converters = { }, } }, + "color": (value) => { + return { + cId: 'lightingColorCtrl', + cmd: 'moveToColor', + zclData: { + colorx: value.x * 65535, + colory: value.y * 65535, + transtime: 10, + }, + } + }, } module.exports = converters; \ No newline at end of file