mirror of
https://github.com/esphome/esphome.git
synced 2026-09-03 19:46:02 +00:00
Fix to_code signature: add ConfigType annotation
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user