Skip to content

Commit

Permalink
Include color mode (xy or colortemp) for hue rgbw bulbs (Koenkk#154)
Browse files Browse the repository at this point in the history
* Include color mode (xy or colortemp) for hue rgbw bulbs

The color mode can be used by home automation to determine the correct way to (re)calculate the set lighting. Zigbee2mqtt plugin for Domoticz will use the acknowledged info to correctly set the sliders (rgb/colortemp) in the UI and database. (my upcoming addition to the plugin to support HUE white and ambiance bulbs will use it)
The hue bulb will only update this value after a color mode change, but it will be cached by MQTT.

* Include color mode (xy or colortemp) for hue rgbw bulbs

The color mode can be used by home automation to determine the correct way to (re)calculate the set lighting. Zigbee2mqtt plugin for Domoticz will use the acknowledged info to correctly set the sliders (rgb/colortemp) in the UI and database. (my upcoming addition to the plugin to support HUE white and ambiance bulbs will use it)
The hue bulb will only update this value after a color mode change, but it will be cached by MQTT.
  • Loading branch information
d-EScape authored and Koenkk committed Dec 3, 2018
1 parent 5dbdbf3 commit 65a83e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ const converters = {
result.color_temp = msg.data.data['colorTemperature'];
}

if (msg.data.data['colorMode']) {
result.color_mode = msg.data.data['colorMode'];
}

if (msg.data.data['currentX'] || msg.data.data['currentY']) {
result.color = {};

Expand Down

0 comments on commit 65a83e1

Please sign in to comment.