Fixed wrong use of "true", added logging to sleep and awake
This commit is contained in:
@@ -26,7 +26,9 @@ class start(threading.Thread, deviceBase):
|
||||
self.channels["status"]["last_value"] = ""
|
||||
|
||||
def run(self):
|
||||
while (true):
|
||||
self.sendtodb('sleeplog', "I'm awake!", 0)
|
||||
while (True):
|
||||
t = datetime.now()
|
||||
if (t.minute == 5 or t.minute == 35):
|
||||
self.sendtodb('sleeplog', "Going to sleep...", 0)
|
||||
self.mcu.sleep(self.sleep_minutes * 60)
|
||||
|
||||
Reference in New Issue
Block a user