register comp already handled by touchscreen core

This commit is contained in:
SGE 2023-12-18 11:30:58 +01:00
parent 01cd131fd6
commit 758134f339
2 changed files with 1 additions and 2 deletions

View file

@ -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)

View file

@ -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))