mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Get the light id from the lamp object.
Former-commit-id: dc7aa992386c2511261614a2a8fe3ccf15d9a591
This commit is contained in:
parent
67970fce08
commit
4af2b11d8f
@ -41,9 +41,9 @@ int LedDevicePhilipsHue::write(const std::vector<ColorRgb> & ledValues) {
|
||||
// Write color if color has been changed.
|
||||
if (xy != lamp.color) {
|
||||
// Send adjust color command in JSON format.
|
||||
put(getStateRoute(lightId), QString("{\"xy\": [%1, %2]}").arg(xy.x).arg(xy.y));
|
||||
put(getStateRoute(lamp.id), QString("{\"xy\": [%1, %2]}").arg(xy.x).arg(xy.y));
|
||||
// Send brightness color command in JSON format.
|
||||
put(getStateRoute(lightId), QString("{\"bri\": %1}").arg(qRound(xy.bri * 255.0f)));
|
||||
put(getStateRoute(lamp.id), QString("{\"bri\": %1}").arg(qRound(xy.bri * 255.0f)));
|
||||
// Remember written color.
|
||||
lamp.color = xy;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user