mirror of
https://github.com/esphome/esphome.git
synced 2024-12-25 06:54:52 +01:00
register comp already handled by touchscreen core
This commit is contained in:
parent
01cd131fd6
commit
758134f339
2 changed files with 1 additions and 2 deletions
|
@ -29,13 +29,11 @@ CONFIG_SCHEMA = touchscreen.TOUCHSCREEN_SCHEMA.extend(
|
|||
}
|
||||
)
|
||||
.extend(i2c.i2c_device_schema(0x48))
|
||||
.extend(cv.COMPONENT_SCHEMA)
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
await i2c.register_i2c_device(var, config)
|
||||
await touchscreen.register_touchscreen(var, config)
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ TOUCHSCREEN_SCHEMA = cv.Schema(
|
|||
|
||||
|
||||
async def register_touchscreen(var, config):
|
||||
await cg.register_component(var, config)
|
||||
|
||||
disp = await cg.get_variable(config[CONF_DISPLAY])
|
||||
cg.add(var.set_display(disp))
|
||||
|
|
Loading…
Reference in a new issue