michielpost / Q42.HueApi

C# helper library to talk to the Philips Hue bridge
MIT License
409 stars 114 forks source link

Unable to see use xy_inc/ColorCoordinatesIncrement #206

Closed slouakde closed 4 years ago

slouakde commented 4 years ago

Sorry if this is just a lack of understanding on my part, but when interacting with the Philips Hue API directly, the property xy_inc is listed as list 2..2 of float 4 (e.g. "xy_inc" : [0.1, 0.1]), but in this package, ColorCoordinatesIncrement is only listed as a decimal, and I can't quite see how this is being set correctly.

I tried testing it, and when I sent a LightCommand with ColorCoordinatesIncrement set to 0.2, the hueClient.SendCommandAsync method returned errors. The error I received was: Address: "/lights/{id}/state/xy_inc" Description: "invalid value, 0.2}, for parameter, xy_inc" Type: 7

slouakde commented 4 years ago

I've attempted to submit a fix for this and I've tested it using a local project

michielpost commented 4 years ago

Thanks for the PR, I'll create a new release and put it up on NuGet