diff --git a/intercom.py b/intercom.py index 8e4723a..bdd4285 100644 --- a/intercom.py +++ b/intercom.py @@ -159,7 +159,7 @@ try: while True: for _station in stations: # new_input_state = GPIO.input(_station['button']) - new_input_state = station['btn'].is_pressed + new_input_state = _station['btn'].is_pressed # Al pulsar el interruptor cambia el estado. elapsed_time = time.clock_gettime(time.CLOCK_MONOTONIC) - _station['button state changed time'] if new_input_state != _station['old button state'] and elapsed_time > 0.2: