aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-02-19 20:54:59 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-02-19 20:54:59 -0500
commit3ed62d41690cac5a343636ae6f1ea831a76491ac (patch)
treeec044b1153c70d6a70f338643dd6879386169a74
parentb356e22256b6956a29fa10f7310d8789d79e9c04 (diff)
Cleaned up Light struct documentation.
-rw-r--r--light.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/light.go b/light.go
index 817c941..f1aadb4 100644
--- a/light.go
+++ b/light.go
@@ -17,15 +17,15 @@ import (
// Light struct defines attributes of a light.
type Light struct {
State struct {
- On bool `json:"on"` // On or Off state of the light ("true" or "false")
- Bri int `json:"bri"` // Brightness value 1-254
- Hue int `json:"hue"` // Hue value 1-65535
- Saturation int `json:"sat"` // Saturation value 0-254
- Effect string `json:"effect"` // "None" or "Colorloop"
- XY [2]float32 `json:"xy"` // Coordinates of color in CIE color space
- CT int `json:"ct"` // Mired Color Temperature (google it)
- Alert string `json:"alert"`
- ColorMode string `json:"colormode"`
+ On bool `json:"on"` // On or Off state of the light ("true" or "false")
+ Bri int `json:"bri"` // Brightness value 1-254
+ Hue int `json:"hue"` // Hue value 1-65535
+ Saturation int `json:"sat"` // Saturation value 0-254
+ Effect string `json:"effect"` // "None" or "Colorloop"
+ XY [2]float32 `json:"xy"` // Coordinates of color in CIE color space
+ CT int `json:"ct"` // Mired Color Temperature (google it)
+ Alert string `json:"alert"` // "selected" or "none"
+ ColorMode string `json:"colormode"` // HS or XY mode for choosing color
Reachable bool `json:"reachable"`
} `json:"state"`
Type string `json:"type"`
@@ -34,8 +34,8 @@ type Light struct {
ManufacturerName string `json:"manufacturername"`
UniqueID string `json:"uniqueid"`
SWVersion string `json:"swversion"`
- Index int // Set by index of light array response // TODO: change to smaller int
- Bridge *Bridge
+ Index int // Set by index of light array response
+ Bridge *Bridge // Set by the bridge when the light is found
}
// LightState used in Light.SetState to amend light attributes.