michielpost / Q42.HueApi

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

Gradient support on UpdateLight #299

Closed burakomer closed 1 year ago

burakomer commented 1 year ago

I wanted to update my gradient lightstrips from the HueApi v2 but Gradient is only used in LightAction which UpdateScene uses. I saw that light api has a similar gradient field. Will this be added soon?

michielpost commented 1 year ago

I added the Gradient property, so you should be able to use this for your gradient lightstrips. Let me know if it works, because I don't have any gradient lightstrips to test with :)

It's on NuGet HueApi version 0.9.8

burakomer commented 1 year ago

Thanks, I tested it and it works.

There is also a new "mode" field in gradient that takes mode strings to set the gradient type. In the Hue app you can acces two of them but it seems that there's a third option as well. Probably for the festivia lights since the mode is "random_pixelated". The other two are "interpolated_palette" and interpolated_palette_mirrored".

I tested these as well. I could make a pull request for them if you'd like. Also if there's any testing related to gradient strips, I'm available. I have a 4 meter gradient strip and a pc gradient strip.

michielpost commented 1 year ago

I did not see the mode field today when I looked at the API specs. Must have missed it. I did add a bunch of other fields. A PR is welcome! Thanks

michielpost commented 1 year ago

Thanks for the PR #300 It's released on NuGet in version 0.9.9

burakomer commented 1 year ago

Thanks for the PR #300

It's released on NuGet in version 0.9.9

No problem. Happy to help!