1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-16 18:22:22 +01:00
* Add black

Update pre commit

Update pre commit

add empty line

* Format with black
This commit is contained in:
Guillermo Ruffino
2021-03-07 16:03:16 -03:00
committed by GitHub
parent 2b60b0f1fa
commit 69879920eb
398 changed files with 21624 additions and 12644 deletions

View File

@@ -3,15 +3,19 @@ import esphome.config_validation as cv
from esphome.components import lcd_base, i2c
from esphome.const import CONF_ID, CONF_LAMBDA
DEPENDENCIES = ['i2c']
AUTO_LOAD = ['lcd_base']
DEPENDENCIES = ["i2c"]
AUTO_LOAD = ["lcd_base"]
lcd_pcf8574_ns = cg.esphome_ns.namespace('lcd_pcf8574')
PCF8574LCDDisplay = lcd_pcf8574_ns.class_('PCF8574LCDDisplay', lcd_base.LCDDisplay, i2c.I2CDevice)
lcd_pcf8574_ns = cg.esphome_ns.namespace("lcd_pcf8574")
PCF8574LCDDisplay = lcd_pcf8574_ns.class_(
"PCF8574LCDDisplay", lcd_base.LCDDisplay, i2c.I2CDevice
)
CONFIG_SCHEMA = lcd_base.LCD_SCHEMA.extend({
cv.GenerateID(): cv.declare_id(PCF8574LCDDisplay),
}).extend(i2c.i2c_device_schema(0x3F))
CONFIG_SCHEMA = lcd_base.LCD_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(PCF8574LCDDisplay),
}
).extend(i2c.i2c_device_schema(0x3F))
def to_code(config):
@@ -20,7 +24,9 @@ def to_code(config):
yield i2c.register_i2c_device(var, config)
if CONF_LAMBDA in config:
lambda_ = yield cg.process_lambda(config[CONF_LAMBDA],
[(PCF8574LCDDisplay.operator('ref'), 'it')],
return_type=cg.void)
lambda_ = yield cg.process_lambda(
config[CONF_LAMBDA],
[(PCF8574LCDDisplay.operator("ref"), "it")],
return_type=cg.void,
)
cg.add(var.set_writer(lambda_))