1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 06:38:17 +00:00

fix some lints

This commit is contained in:
Lazar Obradovic 2018-10-15 22:14:10 +02:00
parent 5263c13bb2
commit 72b7afe947
3 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import voluptuous as vol
import esphomeyaml.config_validation as cv
from esphomeyaml.const import CONF_ADDRESS, CONF_ID, CONF_MCP23017
from esphomeyaml.const import CONF_ADDRESS, CONF_ID
from esphomeyaml.helpers import App, Pvariable, esphomelib_ns
DEPENDENCIES = ['i2c']

View File

@ -585,7 +585,7 @@ def generic_gpio_pin_expression_(conf, mock_obj, default_mode):
return
number = conf[CONF_NUMBER]
inverted = conf.get(CONF_INVERTED)
if any (mux in conf for mux in [CONF_PCF8574, CONF_MCP23017]):
if any(mux in conf for mux in [CONF_PCF8574, CONF_MCP23017]):
hub = None
for hub in get_variable(conf[mux]):
yield None

View File

@ -297,6 +297,7 @@ PCF8574_INPUT_PIN_SCHEMA = PCF8574_OUTPUT_PIN_SCHEMA.extend({
vol.Optional(CONF_MODE): vol.All(vol.Upper, cv.one_of("INPUT", "INPUT_PULLUP")),
})
MCP23017_OUTPUT_PIN_SCHEMA = vol.Schema({
vol.Required(CONF_MCP23017): cv.use_variable_id(mcp23017.MCP23017Component),
vol.Required(CONF_NUMBER): vol.Coerce(int),
@ -308,6 +309,7 @@ MCP23017_INPUT_PIN_SCHEMA = MCP23017_OUTPUT_PIN_SCHEMA.extend({
vol.Optional(CONF_MODE): vol.All(vol.Upper, cv.one_of("INPUT", "INPUT_PULLUP")),
})
def internal_gpio_output_pin_schema(value):
if isinstance(value, dict):
return GPIO_FULL_OUTPUT_PIN_SCHEMA(value)