retrun res

This commit is contained in:
karl.hudgell 2021-10-26 17:00:16 +01:00
parent 507b15ed72
commit 3720863d15

View File

@ -25,12 +25,14 @@ def run_bulb_action(value):
@app.route("/on")
def on():
return {run_bulb_action("cc2333")}
res = run_bulb_action("cc2333")
return {"result": res}
@app.route("/off")
def off():
return {run_bulb_action("cc2433")}
res = run_bulb_action("cc2433")
return {"result": res}
@app.route("/colour")
@ -42,4 +44,5 @@ def colour():
hex = rgb2hex(r, g, b)
hex = hex.replace("#", "")
value = "56" + hex + "00f0aa"
return {run_bulb_action(value)}
res = run_bulb_action(value)
return {"result": res}