diff options
Diffstat (limited to 'light.go')
-rw-r--r-- | light.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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() |