diff --git a/esphome/components/icnt86/touchscreen.py b/esphome/components/icnt86/touchscreen.py index 056f07fff7..4765e0b0c4 100644 --- a/esphome/components/icnt86/touchscreen.py +++ b/esphome/components/icnt86/touchscreen.py @@ -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) diff --git a/esphome/components/touchscreen/__init__.py b/esphome/components/touchscreen/__init__.py index c1e934ffc4..e8d5eb070a 100644 --- a/esphome/components/touchscreen/__init__.py +++ b/esphome/components/touchscreen/__init__.py @@ -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))