fix pylint warnings

This commit is contained in:
sfam 2015-08-26 00:02:52 +01:00
parent ab5a569922
commit cfc2232c22

View File

@ -46,7 +46,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
if GPIO is None: if GPIO is None:
_LOGGER.error('RPi.GPIO not available. rpi_gpio ports ignored.') _LOGGER.error('RPi.GPIO not available. rpi_gpio ports ignored.')
return return
# pylint: disable=no-member
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
switches = [] switches = []
@ -73,9 +73,9 @@ class RPiGPIOSwitch(ToggleEntity):
def __init__(self, name, gpio, active_state): def __init__(self, name, gpio, active_state):
self._name = name or DEVICE_DEFAULT_NAME self._name = name or DEVICE_DEFAULT_NAME
self._state = False if self._active_state == "HIGH" else True
self._gpio = gpio self._gpio = gpio
self._active_state = active_state self._active_state = active_state
self._state = False if self._active_state == "HIGH" else True
# pylint: disable=no-member # pylint: disable=no-member
GPIO.setup(gpio, GPIO.OUT) GPIO.setup(gpio, GPIO.OUT)