Don't build Adafruit_BBIO - doesn't work on all platforms. (#5281)
* Don't build Adafruit_BBIO - doesn't work on all platforms. * Disable pylint import warning on BBIO.pull/5290/head
parent
d4a54acda0
commit
9a3c0c8cd3
|
@ -19,6 +19,7 @@ DOMAIN = 'bbb_gpio'
|
|||
# pylint: disable=no-member
|
||||
def setup(hass, config):
|
||||
"""Setup the Beaglebone black GPIO component."""
|
||||
# pylint: disable=import-error
|
||||
import Adafruit_BBIO.GPIO as GPIO
|
||||
|
||||
def cleanup_gpio(event):
|
||||
|
@ -33,33 +34,41 @@ def setup(hass, config):
|
|||
return True
|
||||
|
||||
|
||||
# noqa: F821
|
||||
|
||||
def setup_output(pin):
|
||||
"""Setup a GPIO as output."""
|
||||
# pylint: disable=import-error,undefined-variable
|
||||
import Adafruit_BBIO.GPIO as GPIO
|
||||
GPIO.setup(pin, GPIO.OUT)
|
||||
|
||||
|
||||
def setup_input(pin, pull_mode):
|
||||
"""Setup a GPIO as input."""
|
||||
# pylint: disable=import-error,undefined-variable
|
||||
import Adafruit_BBIO.GPIO as GPIO
|
||||
GPIO.setup(pin, GPIO.IN,
|
||||
GPIO.PUD_DOWN if pull_mode == 'DOWN' else GPIO.PUD_UP)
|
||||
GPIO.setup(pin, GPIO.IN, # noqa: F821
|
||||
GPIO.PUD_DOWN if pull_mode == 'DOWN' # noqa: F821
|
||||
else GPIO.PUD_UP) # noqa: F821
|
||||
|
||||
|
||||
def write_output(pin, value):
|
||||
"""Write a value to a GPIO."""
|
||||
# pylint: disable=import-error,undefined-variable
|
||||
import Adafruit_BBIO.GPIO as GPIO
|
||||
GPIO.output(pin, value)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
def edge_detect(pin, event_callback, bounce):
|
||||
"""Add detection for RISING and FALLING events."""
|
||||
# pylint: disable=import-error,undefined-variable
|
||||
import Adafruit_BBIO.GPIO as GPIO
|
||||
GPIO.add_event_detect(
|
||||
pin,
|
||||
|
|
|
@ -13,7 +13,7 @@ async_timeout==1.1.0
|
|||
--only-binary=all http://github.com/getSenic/nuimo-linux-python/archive/29fc42987f74d8090d0e2382e8f248ff5990b8c9.zip#nuimo==1.0.0
|
||||
|
||||
# homeassistant.components.bbb_gpio
|
||||
Adafruit_BBIO==1.0.0
|
||||
# Adafruit_BBIO==1.0.0
|
||||
|
||||
# homeassistant.components.isy994
|
||||
PyISY==1.0.7
|
||||
|
|
|
@ -10,6 +10,7 @@ COMMENT_REQUIREMENTS = (
|
|||
'RPi.GPIO',
|
||||
'rpi-rf',
|
||||
'Adafruit_Python_DHT',
|
||||
'Adafruit_BBIO',
|
||||
'fritzconnection',
|
||||
'pybluez',
|
||||
'bluepy',
|
||||
|
|
Loading…
Reference in New Issue