Added doorbell value debug logging.
authorLuke Hoersten <luke@hoersten.org>
Tue, 30 Jan 2018 09:22:57 -0600
changeset 10 38c4094d0d57
parent 9 511e97bd5566
child 11 a70d948427d3
Added doorbell value debug logging.
src/doord.py
--- a/src/doord.py	Tue Jan 30 08:41:33 2018 -0600
+++ b/src/doord.py	Tue Jan 30 09:22:57 2018 -0600
@@ -42,6 +42,9 @@
     analog_value = automationhat.analog.one.read()
     doorbell_on_state = 6.0 < analog_value and analog_value < 6.3
 
+    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")