mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 00:05:43 +00:00
Climate Mitsubishi (#725)
* add climate * Mitsubishi updates * refactor mitsubishi to use climate_ir * lint
This commit is contained in:
committed by
GitHub
parent
c8ccb06f11
commit
eea78531a1
18
esphome/components/mitsubishi/climate.py
Normal file
18
esphome/components/mitsubishi/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']
|
||||
|
||||
mitsubishi_ns = cg.esphome_ns.namespace('mitsubishi')
|
||||
MitsubishiClimate = mitsubishi_ns.class_('MitsubishiClimate', climate_ir.ClimateIR)
|
||||
|
||||
CONFIG_SCHEMA = climate_ir.CLIMATE_IR_SCHEMA.extend({
|
||||
cv.GenerateID(): cv.declare_id(MitsubishiClimate),
|
||||
})
|
||||
|
||||
|
||||
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