cosmetics cv i2c

This commit is contained in:
HB
2020-09-30 03:31:20 +02:00
parent ccb215e725
commit ff81f6a762
2 changed files with 6 additions and 2 deletions
@@ -5,12 +5,14 @@ from esphome.const import CONF_ID
DEPENDENCIES = ['i2c']
CONF_I2C_ADDR = 0x01
empty_i2c_component_ns = cg.esphome_ns.namespace('empty_i2c_component')
EmptyI2CComponent = empty_i2c_component_ns.class_('EmptyI2CComponent', cg.Component, i2c.I2CDevice)
CONFIG_SCHEMA = cv.Schema({
cv.GenerateID(): cv.declare_id(EmptyI2CComponent)
}).extend(cv.COMPONENT_SCHEMA).extend(i2c.i2c_device_schema(0x29))
}).extend(cv.COMPONENT_SCHEMA).extend(i2c.i2c_device_schema(CONF_I2C_ADDR))
def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])