Fix to_code signature: add ConfigType annotation

This commit is contained in:
J. Nick Koston
2026-03-26 15:26:51 -10:00
parent 991c34a4f3
commit 1c054db1f1
@@ -3,6 +3,7 @@
import esphome.codegen as cg
from esphome.components import climate
import esphome.config_validation as cv
from esphome.types import ConfigType
legacy_climate_ns = cg.esphome_ns.namespace("legacy_climate_test")
LegacyClimate = legacy_climate_ns.class_("LegacyClimate", climate.Climate, cg.Component)
@@ -10,6 +11,6 @@ LegacyClimate = legacy_climate_ns.class_("LegacyClimate", climate.Climate, cg.Co
CONFIG_SCHEMA = climate.climate_schema(LegacyClimate).extend(cv.COMPONENT_SCHEMA)
async def to_code(config):
async def to_code(config: ConfigType) -> None:
var = await climate.new_climate(config)
await cg.register_component(var, config)