diff --git a/README.md b/README.md index 4e1d22a..8d18837 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Q42.HueApi Open source library for communication with the Philips Hue bridge. This library covers all the Philips hue API calls! You can set the state of your lights, update the Bridge configuration, create groups, schedules etc. -This library targets `.net461`, `.net 6` and `.net 7`! +This library targets `.net462`, `.net 6` and `.net 7`! Download directly from NuGet: - Clip API v2: **new** [HueApi on NuGet](https://nuget.org/packages/HueApi) - Clip API v1: (legacy) [Q42.HueApi on NuGet](https://nuget.org/packages/Q42.HueApi) @@ -31,11 +31,12 @@ var localHueApi = new LocalHueApi("BRIDGE_IP", "KEY"); Register your application ```cs - //Make sure the user has pressed the button on the bridge before calling RegisterAsync - //It will throw an LinkButtonNotPressedException if the user did not press the button - var regResult = await LocalHueClient.RegisterAsync("BRIDGE_IP", "mypersonalappname", "mydevicename"); - //Save the app key for later use and use it to initialize LocalHueApi - var appKey = regResult.Username; +//Make sure the user has pressed the button on the bridge before calling RegisterAsync +//It will throw an LinkButtonNotPressedException if the user did not press the button +var regResult = await LocalHueClient.RegisterAsync("BRIDGE_IP", "mypersonalappname", "mydevicename"); + +//Save the app key for later use and use it to initialize LocalHueApi +var appKey = regResult.Username; ``` Change the lights: @@ -46,6 +47,7 @@ var id = all.Data.Last().Id; //Pick a light var req = new UpdateLight() .TurnOn() .SetColor(new ColorConverters.RGBColor("FF0000")); + var result = await localHueApi.UpdateLightAsync(id, req); ``` diff --git a/src/HueApi.ColorConverters/HueApi.ColorConverters.csproj b/src/HueApi.ColorConverters/HueApi.ColorConverters.csproj index 60b44d2..6452211 100644 --- a/src/HueApi.ColorConverters/HueApi.ColorConverters.csproj +++ b/src/HueApi.ColorConverters/HueApi.ColorConverters.csproj @@ -1,7 +1,7 @@ - net461;net6.0;net7.0 + net462;net6.0;net7.0 preview enable enable diff --git a/src/HueApi.Entertainment/HueApi.Entertainment.csproj b/src/HueApi.Entertainment/HueApi.Entertainment.csproj index bd94bc9..4315a7d 100644 --- a/src/HueApi.Entertainment/HueApi.Entertainment.csproj +++ b/src/HueApi.Entertainment/HueApi.Entertainment.csproj @@ -1,7 +1,7 @@ - net461;net6.0;net7.0 + net462;net6.0;net7.0 preview enable enable diff --git a/src/HueApi/HueApi.csproj b/src/HueApi/HueApi.csproj index a159b65..9585c0a 100644 --- a/src/HueApi/HueApi.csproj +++ b/src/HueApi/HueApi.csproj @@ -1,7 +1,7 @@ - net461;net6.0;net7.0 + net462;net6.0;net7.0 preview enable enable