From acc0f61e60172af07e7f93ada57230fb30a47d8b Mon Sep 17 00:00:00 2001 From: ntim Date: Mon, 2 Mar 2015 12:51:50 +0000 Subject: [PATCH] Reverted last commit due to new api version. Former-commit-id: 1b6a204183d43865d42d4ee9f3ecf28408c86a9c --- libsrc/leddevice/LedDevicePhilipsHue.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsrc/leddevice/LedDevicePhilipsHue.cpp b/libsrc/leddevice/LedDevicePhilipsHue.cpp index 10437a02..c8cfa339 100755 --- a/libsrc/leddevice/LedDevicePhilipsHue.cpp +++ b/libsrc/leddevice/LedDevicePhilipsHue.cpp @@ -166,6 +166,10 @@ int LedDevicePhilipsHue::write(const std::vector & 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),