esphome/esphome/components/electra_rc3_ir/climate.py

22 lines
603 B
Python

import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import climate_ir
from esphome.const import CONF_ID
AUTO_LOAD = ["climate_ir"]
CODEOWNERS = ["@roygolds"]
electra_rc3_ir_ns = cg.esphome_ns.namespace("electra_rc3_ir")
ElectraRC3IR = electra_rc3_ir_ns.class_("ElectraRC3IR", climate_ir.ClimateIR)
CONFIG_SCHEMA = climate_ir.CLIMATE_IR_WITH_RECEIVER_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(ElectraRC3IR),
}
)
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await climate_ir.register_climate_ir(var, config)