michielpost / Q42.HueApi

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

Error when updating SensorConfig #89

Closed niels9001 closed 7 years ago

niels9001 commented 7 years ago

"parameter, reachable, is not modifiable" "parameter, battery, is not modifiable"

Sensor selectedSensor = selectedSwitch.DataContext as Sensor; HueResults x = await Client.ChangeSensorConfigAsync(selectedSensor.Id, selectedSensor.Config);

Seems that the reachable and battery should be ignored.

michielpost commented 7 years ago

In the documentation battery is marked WO, Optional for Put Commands. Indicating they can be provided. But seems logical you can't update the battery status yourself. https://developers.meethue.com/documentation/supported-sensors

If you make battery and reachable null, they won't be send to the bridge. I'll make an update so they will be automatically removed.

michielpost commented 7 years ago

https://github.com/Q42/Q42.HueApi/commit/59ced274d8b82e11ee788c2db1a58532c7701f7a

michielpost commented 7 years ago

Fixed in release 3.2.7, now on NuGet