1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 00:05:43 +00:00
Files
esphome/esphome/components/noblex/climate.py
2025-03-20 09:51:23 -10:00

21 lines
555 B
Python

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"]
noblex_ns = cg.esphome_ns.namespace("noblex")
NoblexClimate = noblex_ns.class_("NoblexClimate", climate_ir.ClimateIR)
CONFIG_SCHEMA = climate_ir.CLIMATE_IR_WITH_RECEIVER_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(NoblexClimate),
}
)
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await climate_ir.register_climate_ir(var, config)