Update __init__.py
This commit is contained in:
committed by
GitHub
parent
44ed70ecf7
commit
b1007313eb
@@ -14,17 +14,12 @@ TCA6408Component = tca6408_ns.class_(
|
|||||||
|
|
||||||
TCA6408GPIOPin = tca6408_ns.class_("TCA6408GPIOPin", cg.GPIOPin)
|
TCA6408GPIOPin = tca6408_ns.class_("TCA6408GPIOPin", cg.GPIOPin)
|
||||||
|
|
||||||
CONFIG_SCHEMA = (
|
CONFIG_SCHEMA = cv.Schema(
|
||||||
cv.Schema(
|
{
|
||||||
{
|
cv.GenerateID(): cv.declare_id(TCA6408Component),
|
||||||
cv.GenerateID(): cv.declare_id(TCA6408Component),
|
cv.Optional(CONF_ADDRESS, default=0x20): cv.i2c_address,
|
||||||
cv.Optional(CONF_ADDRESS, default=0x20): cv.i2c_address,
|
}
|
||||||
cv.Optional(CONF_INTERRUPT_PIN): gpio.gpio_input_pin_schema,
|
).extend(cv.COMPONENT_SCHEMA)
|
||||||
}
|
|
||||||
)
|
|
||||||
.extend(cv.COMPONENT_SCHEMA)
|
|
||||||
.extend(i2c.i2c_device_schema(0x20))
|
|
||||||
)
|
|
||||||
|
|
||||||
async def to_code(config):
|
async def to_code(config):
|
||||||
var = cg.new_Pvariable(config[CONF_ID])
|
var = cg.new_Pvariable(config[CONF_ID])
|
||||||
|
|||||||
Reference in New Issue
Block a user