diff py/fridge.py @ 221:720809f6c968

Fridge.is_off() wasn't a method
author Matt Johnston <matt@ucc.asn.au>
date Fri, 19 Dec 2014 22:34:41 +0800
parents 251524081924
children d9e81a563923
line wrap: on
line diff
--- a/py/fridge.py	Fri Dec 19 22:32:59 2014 +0800
+++ b/py/fridge.py	Fri Dec 19 22:34:41 2014 +0800
@@ -75,7 +75,7 @@
 
         # Safety to avoid bad things happening to the fridge motor (?)
         # When it turns off don't start up again for at least FRIDGE_DELAY
-        if self.is_off() and off_time < config.FRIDGE_DELAY:
+        if not self.is_on() and off_time < config.FRIDGE_DELAY:
             L("fridge skipping, too early")
             return