summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
866247a)
to get timestamp and value of current temperatures
+@app.route('/api/<version>/currentairtemperature')
+def currentair(version):
+ value, timestamp = currentairtemperature(cityid)
+ return jsonify({"value": value, "timestamp": timestamp})
+
+
+@app.route('/api/<version>/currentwatertemperature')
+def currentwater(version):
+ value, timestamp = currentwatertemperature(mainsensor)
+ return jsonify({"value": value, "timestamp": timestamp})
+
+
@app.route("/")
def index():
airvalue, airtime = currentairtemperature(cityid)
@app.route("/")
def index():
airvalue, airtime = currentairtemperature(cityid)