summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.py b/main.py
index f58474f..04736c8 100644
--- a/main.py
+++ b/main.py
@@ -16,7 +16,7 @@ DBFILE = "data.db"
db = sql.db(DBFILE)
-#weather = weather_met_no()
+# weather = weather_met_no()
# Check if running on correct device : defensive coding against running
# on the wrong device
@@ -38,7 +38,7 @@ def main_page():
"main.html",
actual_temp=boiler.temperature,
target_temp=boiler.target
- #forecast_temp=weather.temperature()
+ # forecast_temp=weather.temperature()
)
@@ -72,18 +72,19 @@ def export(opt):
elif opt == "pdf":
pass
else:
- return render_template(
- "error.html", error="Invalid export type"
- )
+ return render_template("error.html", error="Invalid export type")
+
def updater():
while True:
boiler.update()
time.sleep(5)
+
def webapp():
app.run(host="0.0.0.0")
+
if __name__ == "__main__":
t1 = Thread(target=webapp)
t2 = Thread(target=updater)