Skip to content

Commit

Permalink
Styling
Browse files Browse the repository at this point in the history
  • Loading branch information
michielpost committed Feb 3, 2023
1 parent 9e82ce2 commit 72f3b1b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand All @@ -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);
```

Expand Down
2 changes: 1 addition & 1 deletion src/HueApi.ColorConverters/HueApi.ColorConverters.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion src/HueApi.Entertainment/HueApi.Entertainment.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion src/HueApi/HueApi.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down

0 comments on commit 72f3b1b

Please sign in to comment.