mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +00:00
fix pylint warnings
This commit is contained in:
parent
ab5a569922
commit
cfc2232c22
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user