This commit is contained in:
2020-07-07 19:04:43 +02:00
parent e14097c329
commit 22385cdef3
5 changed files with 10 additions and 10 deletions

View File

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