Closed gkapellmann closed 1 year ago
The Room API is only to manage rooms (create rooms, update which light is in a room etc). The Room API can't be used to set light state. You need to use the Grouped Light API for that.
So first you need to find the Grouped Light ID that corresponds to your Room, and then you can update it:
UpdateGroupedLight req = new UpdateGroupedLight();
req.On = new Models.On() { IsOn = true };
var result = await localHueClient.UpdateGroupedLightAsync(id, req);
More info can be found in the API reference: https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_grouped_light
Aja! ok, now this works.
Yeap, that link was very useful.
Thanks!
I am missing something here, but I seem to not be able to change the state of a room, simple turn of or on. What I am trying is:
But "TurnOn()" and "TurnOff" dont exist, and I was unable to fins a proper request for the rooms.
"UpdateGroupedLightAsync" doest work for rooms, and I am guessing is not meant to be used here.
What am I missing?