diff --git a/gpio_components/input_devices.py b/gpio_components/input_devices.py index 28295ed..f586d6b 100644 --- a/gpio_components/input_devices.py +++ b/gpio_components/input_devices.py @@ -18,6 +18,7 @@ class InputDevice(object): self.inactive = 1 GPIO.setup(pin, GPIO.IN, self.pull) + @property def is_active(self): return GPIO.input(self.pin) == self.active