def anim(value): light.stopAnim() anim = None try: anim = anims[value] light.stopAnim() light.startAnim(anim) except KeyError: light.showDefaultColor light.update() return value
def off(): light.stopAnim() light.setValue(0) light.update() return repr(light.getColor())
def setValue(value): light.stopAnim() light.setValue(value) light.update() return repr(light.getColor())
def showDefaultColor(): light.stopAnim() light.showDefaultColor() light.update() return repr(light.getColor())