mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Beaglebone Black binary sensor (#5422)
* Configuration parameters defined * Edge detection added * Example configuration added and tipo corrected * Comments updated, lint update * Added check for input pull_mode * Too long line * trailing white space * Configuration parameters defined * Edge detection added * Example configuration added and tipo corrected * Comments updated, lint update * Added check for input pull_mode * Too long line * trailing white space * pylint disable import error * read_input() changed to return boolean value, according changes in binary sensor * example configuration in docstring changed to mention direct web link, pylint update * read_input() updated according review
This commit is contained in:
committed by
Paulus Schoutsen
parent
067e11ea5c
commit
f4d2d69a5d
@@ -63,7 +63,7 @@ def read_input(pin):
|
||||
"""Read a value from a GPIO."""
|
||||
# pylint: disable=import-error,undefined-variable
|
||||
import Adafruit_BBIO.GPIO as GPIO
|
||||
return GPIO.input(pin)
|
||||
return GPIO.input(pin) is GPIO.HIGH
|
||||
|
||||
|
||||
def edge_detect(pin, event_callback, bounce):
|
||||
|
||||
Reference in New Issue
Block a user