def off(): strip.off() return ok()
def set_effect(effect_name): try: strip.set_effect(effect_name) except NameError: raise BadRequestException('effect does not exist') return ok()
def stop_effect(): strip.stop_effect() return ok()
def get_effects(): return ok(None, strip.get_effect_names())
def set_color(): body = request.json strip.set_color(body['r'], body['g'], body['b']) return ok()
def get_colors(): colors = strip.get_colors() return ok(None, colors)