fix
This commit is contained in:
parent
22385cdef3
commit
84b3227ec7
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user