From 84b3227ec78e36602417d452ee5c2af38fb4f23f Mon Sep 17 00:00:00 2001 From: Nick Leeman Date: Tue, 7 Jul 2020 19:04:52 +0200 Subject: [PATCH] fix --- echo-master/echo_controller/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/echo-master/echo_controller/switch.py b/echo-master/echo_controller/switch.py index 2d2dc76..c7461ec 100644 --- a/echo-master/echo_controller/switch.py +++ b/echo-master/echo_controller/switch.py @@ -54,7 +54,7 @@ class Switch: # Check if light levels are low enough to turn on light collectionLight = EchoDB.EchoDB.database['LightLogs'] data = collectionLight.find().sort([('timestamp', -1)]).limit(1) - if data[0]['light_amount'] > 250: + if data[0]['light_amount'] > 20: return; # Light is already on, update automatic shutdown.