aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2018-05-23 23:15:29 -0400
committerBen Burwell <ben@benburwell.com>2018-05-23 23:15:29 -0400
commit32d8e201749f37fda7607408ae3d89d58ebf685f (patch)
tree4d8211f019eb94ec14bdceda2f4f1a78be684ee5
parent9baef1639cd3efb39b003b76d618a70757a414b4 (diff)
Add capabilities to Light structHEADmaster
The Hue API returns a "capabilities" key along with each light that specifies the parameters available for the light. These capabilities allow subsequent requests/settings to be made more intelligently depending on the features supported by the luminaire.
-rw-r--r--light.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/light.go b/light.go
index aef5954..592283b 100644
--- a/light.go
+++ b/light.go
@@ -28,6 +28,23 @@ type Light struct {
ColorMode string `json:"colormode"` // HS or XY mode for choosing color
Reachable bool `json:"reachable"`
} `json:"state"`
+ Capabilities struct {
+ Certified bool `json:"certified,omitempty"`
+ Control struct {
+ MinDimLevel uint16 `json:"mindimlevel,omitempty"`
+ MaxLumen uint16 `json:"maxlumen,omitempty"`
+ ColorGamutType string `json:"colorgamuttype,omitempty"`
+ ColorGamut [][2]float32 `json:"colorgamut,omitempty"`
+ CT struct {
+ Min uint16 `json:"min,omitempty"`
+ Max uint16 `json:"max,omitempty"`
+ } `json:"ct,omitempty"`
+ } `json:"control,omitempty"`
+ Streaming struct {
+ Renderer bool `json:"renderer,omitempty"`
+ Proxy bool `json:"proxy,omitempty"`
+ } `json:"streaming,omitempty"`
+ } `json:"capabilities,omitempty"`
Type string `json:"type"`
Name string `json:"name"`
ModelID string `json:"modelid"`