diff options
| author | root <root@turin.home> | 2022-01-16 13:41:03 +0000 |
|---|---|---|
| committer | root <root@turin.home> | 2022-01-16 13:41:03 +0000 |
| commit | 2ee793179e345f3355462c8d2753543bc397a2aa (patch) | |
| tree | d1c68adff555f3dc3fbf8a5702855114119bff10 /main.py | |
| parent | befb917ec5cbcbb0aaae33c53e6c0b2c4b92afcf (diff) | |
Reformat code
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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) |
