diff --git a/thermostat.py b/thermostat.py index 7e5982a..58f5518 100644 --- a/thermostat.py +++ b/thermostat.py @@ -272,7 +272,9 @@ def thermostat_loop(): global forced_mode global new_forced_mode global current_time - global cursor + + dbconn = sqlite3.connect("./instance/thermostat.db") + cursor = dbconn.cursor() while True: # if stop.is_set():