aboutsummaryrefslogtreecommitdiff
path: root/light.go
diff options
context:
space:
mode:
Diffstat (limited to 'light.go')
-rw-r--r--light.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/light.go b/light.go
index cc8a112..5c975cc 100644
--- a/light.go
+++ b/light.go
@@ -1,5 +1,11 @@
-// http://www.developers.meethue.com/documentation/lights-api
+/*
+* light.go
+* GoHue library for Philips Hue
+* Copyright (C) 2016 Collin Guarino (Collinux)
+* License: GPL version 2 or higher http://www.gnu.org/licenses/gpl.html
+*/
+// http://www.developers.meethue.com/documentation/lights-api
package hue
import (
@@ -56,7 +62,10 @@ func (self *Light) SetName(name string) error {
body := make(map[string]string)
body["name"] = name
_, _, err := self.Bridge.Put(uri, body)
- return err
+ if err != nil {
+ return err
+ }
+ return nil
}
// Light.Off will turn the light source off