aboutsummaryrefslogtreecommitdiff
path: root/light.go
diff options
context:
space:
mode:
Diffstat (limited to 'light.go')
-rw-r--r--light.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/light.go b/light.go
index 0caca2e..565feca 100644
--- a/light.go
+++ b/light.go
@@ -70,14 +70,19 @@ func (self *Light) Toggle() error {
}
}
+// Light.ColorLoopOn will turn the light on and set the effect to "colorloop"
func (self *Light) ColorLoopOn() error {
return SetLightState(self, LightState{On: true, Effect: "colorloop"})
}
+// Light.ColorLoopOn will turn the light on and set the effect to "none"
func (self *Light) ColorLoopOff() error {
return SetLightState(self, LightState{On: true, Effect: "none"})
}
+// Light.ColorLoop will set the light state to a colorloop if there is no
+// current effect in place or if the state is in colorloop then it will
+// set it to "none".
func (self *Light) ColorLoop() error {
if self.State.Effect == "colorloop" {
return self.ColorLoopOff()