aboutsummaryrefslogtreecommitdiff
path: root/light.go
diff options
context:
space:
mode:
Diffstat (limited to 'light.go')
-rw-r--r--light.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/light.go b/light.go
index b62fec4..0caca2e 100644
--- a/light.go
+++ b/light.go
@@ -62,11 +62,11 @@ func (self *Light) On() error {
}
// light.Toggle will toggle the light source on and off
-func (self *Light) Toggle() {
+func (self *Light) Toggle() error {
if self.State.On {
- self.Off()
+ return self.Off()
} else {
- self.On()
+ return self.On()
}
}