michielpost / Q42.HueApi

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

Adding a group of type LightGroup fails with "parameter, class, not available" #153

Closed igor-grant closed 6 years ago

igor-grant commented 6 years ago

First off, thank you for your hard work on this library. It has saved me countless hours integrating with the Philips Hue API.

Whenever I call the Q42 CreateGroupAsync method with a GroupType of LightGroup and a RoomClass of null, the Hue API responds with "parameter, class, not available". I replicated this with Fiddler directly to the Hue API and found that the it requires the entire RoomClass node to be missing from the JSON payload (null) if the GroupType is LightGroup. It appears as though the Q42 method sets a default value for this property ("Other") regardless of the GroupType. Could you please only include this property in the JSON if the GroupType is Room?

Thanks, Grant

michielpost commented 6 years ago

Thanks! Bugfix for this is now available on NuGet version 3.7.1

igor-grant commented 6 years ago

Thanks!