Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit dc7aa99

Browse files
author
Tim Niggemann
committed
Get the light id from the lamp object.
1 parent 129c34f commit dc7aa99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libsrc/leddevice/LedDevicePhilipsHue.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ int LedDevicePhilipsHue::write(const std::vector<ColorRgb> & ledValues) {
4141
// Write color if color has been changed.
4242
if (xy != lamp.color) {
4343
// Send adjust color command in JSON format.
44-
put(getStateRoute(lightId), QString("{\"xy\": [%1, %2]}").arg(xy.x).arg(xy.y));
44+
put(getStateRoute(lamp.id), QString("{\"xy\": [%1, %2]}").arg(xy.x).arg(xy.y));
4545
// Send brightness color command in JSON format.
46-
put(getStateRoute(lightId), QString("{\"bri\": %1}").arg(qRound(xy.bri * 255.0f)));
46+
put(getStateRoute(lamp.id), QString("{\"bri\": %1}").arg(qRound(xy.bri * 255.0f)));
4747
// Remember written color.
4848
lamp.color = xy;
4949
}

0 commit comments

Comments
 (0)