mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 19:54:14 +01:00
582ac4ac81
The IR signals are based on captures from the WH-H01EE remote controller. Both transmit and receive are supported.
18 lines
541 B
Python
18 lines
541 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']
|
|
|
|
toshiba_ns = cg.esphome_ns.namespace('toshiba')
|
|
ToshibaClimate = toshiba_ns.class_('ToshibaClimate', climate_ir.ClimateIR)
|
|
|
|
CONFIG_SCHEMA = climate_ir.CLIMATE_IR_WITH_RECEIVER_SCHEMA.extend({
|
|
cv.GenerateID(): cv.declare_id(ToshibaClimate),
|
|
})
|
|
|
|
|
|
def to_code(config):
|
|
var = cg.new_Pvariable(config[CONF_ID])
|
|
yield climate_ir.register_climate_ir(var, config)
|