fix compilation error if display is trying to register as component

Without those changes, compilation breaks if a display is trying to register as a component itself (this is now done automatically when registering the display).
This commit is contained in:
Leandro Ebner
2024-02-17 15:29:39 +01:00
committed by GitHub
parent 9b4677404c
commit 9fccfff1ab

View File

@@ -38,7 +38,8 @@ CONFIG_SCHEMA = cv.All(
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
if cv.Version.parse(ESPHOME_VERSION) < cv.Version.parse("2023.12.0"):
await cg.register_component(var, config)
await display.register_display(var, config)
cg.add(var.set_pins(