You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
279 B
Python
17 lines
279 B
Python
5 years ago
|
from webserver import render_html, http_respond
|
||
|
|
||
|
SENSOR_DATA = {
|
||
|
"cel": 22,
|
||
|
"fahr": 71.6,
|
||
|
"light": 90,
|
||
|
"hum": 35,
|
||
|
}
|
||
|
|
||
|
def report():
|
||
|
"""Mock function to return sensor data"""
|
||
|
return SENSOR_DATA
|
||
|
|
||
|
while True:
|
||
|
context = report()
|
||
|
html = render_html(context)
|
||
|
http_respond(html)
|