Closed Sleezly closed 6 years ago
What bridge version are you on?
From the documentation:
For modifying lightstates on 1.11 or higher use: /api/<username>/scenes/<id>/lightstates/<id>
For modifying lightstates on bridge versions lower than 1.11 use: /api/<username>/scenes/<id>/lights/<id>/state
This library targets the latest bridge firmware. So lightstates should be used.
But it does look like there is a bug in my original code:
new Uri(String.Format("{0}scenes/{1}/lights/{1}/lightstate", ApiBase, sceneId, lightId)
I think that should be:
new Uri(String.Format("{0}scenes/{1}/lights/{2}/lightstate", ApiBase, sceneId, lightId)
Maybe that also fixes your issue?
Ah I see you also found that and made issue https://github.com/Q42/Q42.HueApi/issues/141
I'll do some testing to see if it works on my bridge.
The new url from this PR does work, it does not return an error. So it looks like the Hue documentation is out of date.
Thanks for the PR!
Thanks for taking the PR! I've updated the nuget package and confirmed the fix is good.
Fixing the URI used by ModifySceneAsync to match documented API usage per section 4.3 here: https://developers.meethue.com/documentation/scenes-api#43_modify_scene
How Verified: