src/doord.py
changeset 11 a70d948427d3
parent 10 38c4094d0d57
child 12 6f6c8df37897
--- a/src/doord.py	Tue Jan 30 09:22:57 2018 -0600
+++ b/src/doord.py	Tue Jan 30 16:47:34 2018 -0600
@@ -40,14 +40,14 @@
 
 def read_doorbell(thread_local):
     analog_value = automationhat.analog.one.read()
-    doorbell_on_state = 6.0 < analog_value and analog_value < 6.3
+    doorbell_on_state = 5.9 < analog_value and analog_value < 6.5
 
     if doorbell_on_state:
         print("doorbell analog value: {}".format(analog_value))
 
     if doorbell_on_state != thread_local.doorbell_on_state:
         thread_local.doorbell_on_state = doorbell_on_state
-        print("doorbell_on") if doorbell_on_state else print("doorbell_off")
+        print("doorbell on") if doorbell_on_state else print("doorbell off")
 
 
 if __name__ == "__main__":