@app.route('<STR_LIT>', methods=['<STR_LIT:GET>'])<EOL>def device_state(device_id):
if device_id not in devices:<EOL><INDENT>return jsonify(success=False)<EOL><DEDENT>return jsonify(state=devices[device_id].state)<EOL>
Get device state via HTTP GET.