From 7b8c5014d0204886fb757c14c205975871c4f914 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 2 Jun 2024 14:50:09 +0200 Subject: [PATCH] Continue Flask migration. --- thermostat.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/thermostat.py b/thermostat.py index f558237..61c0e66 100644 --- a/thermostat.py +++ b/thermostat.py @@ -204,12 +204,6 @@ with app.app_context(): db.create_all() migrate = Migrate(app, db, compare_type=True) -start_time = time.time() -last_control_time = None -new_forced_mode = None -target_name = default_target -first_loop = True - # TODO: Get Linky overload warning #cursor.execute("SELECT * FROM set_mode") @@ -219,6 +213,12 @@ first_loop = True #sys.stdout.flush() def thermostat_loop(): + start_time = time.time() + last_control_time = None + new_forced_mode = None + target_name = default_target + first_loop = True + while True: # if stop.is_set(): # httpd.shutdown()