aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--light.go5
-rw-r--r--light_test.go2
2 files changed, 5 insertions, 2 deletions
diff --git a/light.go b/light.go
index cc8a112..7396dd1 100644
--- a/light.go
+++ b/light.go
@@ -56,7 +56,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
diff --git a/light_test.go b/light_test.go
index 20ab4b8..077dff7 100644
--- a/light_test.go
+++ b/light_test.go
@@ -30,5 +30,5 @@ func TestSetLightState(t *testing.T) {
time.Sleep(time.Second)
selectedLight.ColorLoop()
- selectedLight.SetName("testing")
+ selectedLight.SetName("Ceiling Fan Outer")
}