diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-02-13 11:35:29 -0500 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-02-13 11:35:29 -0500 |
commit | d676089ff95cef488963555e75929da20326f612 (patch) | |
tree | aa2e80a4f2db3dc31a5eb56ca4fe85c61df21fb4 /light.go | |
parent | 922e7290c37e46046b1a4e68818c77c44a192b2e (diff) |
Cleaned up documentation and tests.
Diffstat (limited to 'light.go')
-rw-r--r-- | light.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -24,7 +24,7 @@ type Light struct { 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 + 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"` @@ -59,6 +59,8 @@ type LightState struct { Name string `json:"name,omitempty"` } +// Light.SetName will assign a new name in the light's +// attributes as recognized by the bridge. func (self *Light) SetName(name string) error { uri := fmt.Sprintf("/api/%s/lights/%d", self.Bridge.Username, self.Index) body := make(map[string]string) |