Reverted last commit due to new api version.

Former-commit-id: 1b6a204183d43865d42d4ee9f3ecf28408c86a9c
This commit is contained in:
ntim 2015-03-02 12:51:50 +00:00
parent aceb29c8c4
commit acc0f61e60

View File

@ -166,6 +166,10 @@ int LedDevicePhilipsHue::write(const std::vector<ColorRgb> & ledValues) {
CiColor xy = lamp.rgbToCiColor(color.red / 255.0f, color.green / 255.0f, color.blue / 255.0f);
// Write color if color has been changed.
if (xy != lamp.color) {
// Switch on if the lamp has been previously switched off.
if (switchOffOnBlack && lamp.color == lamp.black) {
put(getStateRoute(lamp.id), QString("{\"on\": true}"));
}
// Send adjust color and brightness command in JSON format.
// We have to set the transition time each time.
put(getStateRoute(lamp.id),