Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Flask GET route. Return the current state of an outlet switch
@app.route("/Outlets/api/outlets/<int:groupNumber>/<int:buttonNumber>",methods=["GET"])
def get_outlet_state(groupNumber, buttonNumber):
return statestorage.get_state(groupNumber, buttonNumber)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment