-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Capture light levels into respective models (#281)
- Loading branch information
1 parent
f8fead4
commit c1e1d11
Showing
5 changed files
with
30 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace HueApi.Models.Sensors | ||
{ | ||
public class LightLevel : HueResource | ||
{ | ||
[JsonPropertyName("enabled")] | ||
public bool Enabled { get; set; } = default!; | ||
|
||
[JsonPropertyName("light")] | ||
public Light Light { get; set; } = default!; | ||
|
||
[JsonPropertyName("owner")] | ||
public ResourceIdentifier? Owner { get; set; } | ||
} | ||
|
||
public class Light | ||
{ | ||
[JsonPropertyName("light_level")] | ||
public int LightLevel { get; set; } = default!; | ||
|
||
[JsonPropertyName("light_level_valid")] | ||
public bool LightLevelValid { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters