From 2aa996b55820ef71367e0957701272c4ef44ab1d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Jan 2017 17:08:48 +0100 Subject: [PATCH] Update name (#5324) --- homeassistant/components/bbb_gpio.py | 7 ++----- homeassistant/components/switch/bbb_gpio.py | 20 +++++--------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/homeassistant/components/bbb_gpio.py b/homeassistant/components/bbb_gpio.py index 52ab14689fd..d8acaaa184c 100644 --- a/homeassistant/components/bbb_gpio.py +++ b/homeassistant/components/bbb_gpio.py @@ -18,7 +18,7 @@ DOMAIN = 'bbb_gpio' # pylint: disable=no-member def setup(hass, config): - """Setup the Beaglebone black GPIO component.""" + """Set up the BeagleBone Black GPIO component.""" # pylint: disable=import-error import Adafruit_BBIO.GPIO as GPIO @@ -71,7 +71,4 @@ def edge_detect(pin, event_callback, bounce): # pylint: disable=import-error,undefined-variable import Adafruit_BBIO.GPIO as GPIO GPIO.add_event_detect( - pin, - GPIO.BOTH, - callback=event_callback, - bouncetime=bounce) + pin, GPIO.BOTH, callback=event_callback, bouncetime=bounce) diff --git a/homeassistant/components/switch/bbb_gpio.py b/homeassistant/components/switch/bbb_gpio.py index f765cb95e1f..ce2d91273f9 100644 --- a/homeassistant/components/switch/bbb_gpio.py +++ b/homeassistant/components/switch/bbb_gpio.py @@ -1,18 +1,8 @@ """ -Allows to configure a switch using BBB GPIO. +Allows to configure a switch using BeagleBone Black GPIO. -Switch example for two GPIOs pins P9_12 and P9_42 -Allowed GPIO pin name is GPIOxxx or Px_x - -switch: - - platform: bbb_gpio - pins: - GPIO0_7: - name: LED Red - P9_12: - name: LED Green - initial: true - invert_logic: true +For more details about this component, please refer to the documentation at +https://home-assistant.io/components/switch.bbb_gpio/ """ import logging @@ -46,7 +36,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ # pylint: disable=unused-argument def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the Beaglebone GPIO devices.""" + """Set up the BeagleBone Black GPIO devices.""" pins = config.get(CONF_PINS) switches = [] @@ -56,7 +46,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class BBBGPIOSwitch(ToggleEntity): - """Representation of a Beaglebone GPIO.""" + """Representation of a BeagleBone Black GPIO.""" def __init__(self, pin, params): """Initialize the pin."""