esphome/esphome/components/toshiba/climate.py
Joppy 582ac4ac81
Add support for Toshiba heat pumps (#1121)
The IR signals are based on captures from the WH-H01EE remote
controller.

Both transmit and receive are supported.
2020-07-13 09:23:53 -03:00

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)