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"] = ""
|
self.channels["status"]["last_value"] = ""
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while (true):
|
self.sendtodb('sleeplog', "I'm awake!", 0)
|
||||||
|
while (True):
|
||||||
t = datetime.now()
|
t = datetime.now()
|
||||||
if (t.minute == 5 or t.minute == 35):
|
if (t.minute == 5 or t.minute == 35):
|
||||||
|
self.sendtodb('sleeplog', "Going to sleep...", 0)
|
||||||
self.mcu.sleep(self.sleep_minutes * 60)
|
self.mcu.sleep(self.sleep_minutes * 60)
|
||||||
|
|||||||
Reference in New Issue
Block a user