json
This commit is contained in:
parent
d2df809ff7
commit
507b15ed72
@ -25,12 +25,12 @@ def run_bulb_action(value):
|
|||||||
|
|
||||||
@app.route("/on")
|
@app.route("/on")
|
||||||
def on():
|
def on():
|
||||||
return run_bulb_action("cc2333")
|
return {run_bulb_action("cc2333")}
|
||||||
|
|
||||||
|
|
||||||
@app.route("/off")
|
@app.route("/off")
|
||||||
def off():
|
def off():
|
||||||
return run_bulb_action("cc2433")
|
return {run_bulb_action("cc2433")}
|
||||||
|
|
||||||
|
|
||||||
@app.route("/colour")
|
@app.route("/colour")
|
||||||
@ -42,4 +42,4 @@ def colour():
|
|||||||
hex = rgb2hex(r, g, b)
|
hex = rgb2hex(r, g, b)
|
||||||
hex = hex.replace("#", "")
|
hex = hex.replace("#", "")
|
||||||
value = "56" + hex + "00f0aa"
|
value = "56" + hex + "00f0aa"
|
||||||
return run_bulb_action(value)
|
return {run_bulb_action(value)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user