mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 16:25:50 +00:00
Add LG Climate IR (#1097)
* Add LG Climate ir * Add LG Climate IR * Add LG Climate IR * Add LG Climate IR * Add LG Climate IR * Add LG Climate IR * Add LG Climate IR Co-authored-by: Sangheon Heo <square99@SangHeonui-Macmini.local>
This commit is contained in:
18
esphome/components/climate_ir_lg/climate.py
Normal file
18
esphome/components/climate_ir_lg/climate.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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']
|
||||
|
||||
climate_ir_lg_ns = cg.esphome_ns.namespace('climate_ir_lg')
|
||||
LgIrClimate = climate_ir_lg_ns.class_('LgIrClimate', climate_ir.ClimateIR)
|
||||
|
||||
CONFIG_SCHEMA = climate_ir.CLIMATE_IR_WITH_RECEIVER_SCHEMA.extend({
|
||||
cv.GenerateID(): cv.declare_id(LgIrClimate),
|
||||
})
|
||||
|
||||
|
||||
def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
yield climate_ir.register_climate_ir(var, config)
|
||||
Reference in New Issue
Block a user