1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00:00

[climate] Update components to use `climate_schema(...)` (#8788)

This commit is contained in:
Jesse Hills
2025-05-14 17:36:21 +12:00
committed by GitHub
parent a12bd78ceb
commit de27ce79dc
32 changed files with 180 additions and 255 deletions

View File

@@ -1,7 +1,5 @@
import esphome.codegen as cg
from esphome.components import climate_ir
import esphome.config_validation as cv
from esphome.const import CONF_ID
AUTO_LOAD = ["climate_ir"]
CODEOWNERS = ["@glmnet"]
@@ -9,13 +7,8 @@ CODEOWNERS = ["@glmnet"]
tcl112_ns = cg.esphome_ns.namespace("tcl112")
Tcl112Climate = tcl112_ns.class_("Tcl112Climate", climate_ir.ClimateIR)
CONFIG_SCHEMA = climate_ir.CLIMATE_IR_WITH_RECEIVER_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(Tcl112Climate),
}
)
CONFIG_SCHEMA = climate_ir.climare_ir_with_receiver_schema(Tcl112Climate)
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await climate_ir.register_climate_ir(var, config)
await climate_ir.new_climate_ir(config)