This commit is contained in:
Nick Leeman 2020-07-07 19:04:52 +02:00
parent 22385cdef3
commit 84b3227ec7

View File

@ -54,7 +54,7 @@ class Switch:
# Check if light levels are low enough to turn on light # Check if light levels are low enough to turn on light
collectionLight = EchoDB.EchoDB.database['LightLogs'] collectionLight = EchoDB.EchoDB.database['LightLogs']
data = collectionLight.find().sort([('timestamp', -1)]).limit(1) data = collectionLight.find().sort([('timestamp', -1)]).limit(1)
if data[0]['light_amount'] > 250: if data[0]['light_amount'] > 20:
return; return;
# Light is already on, update automatic shutdown. # Light is already on, update automatic shutdown.