1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-14 13:55:45 +00:00
Files
esphome/esphome/components/coolix/climate.py
Pavel Golovin 6ae59bb43d Fujitsu General climate new component (#677)
* new Fujitsu-General climate component

* Refactor out climate_ir

CC @glmnet

Refactored out climate_ir python files too.
Fixed invalid namespace name for climate_ir.

* Add namespace lint check

* Refactor Fujitsu Climate to climate_ir


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-31 23:46:07 +01:00

19 lines
535 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']
coolix_ns = cg.esphome_ns.namespace('coolix')
CoolixClimate = coolix_ns.class_('CoolixClimate', climate_ir.ClimateIR)
CONFIG_SCHEMA = climate_ir.CLIMATE_IR_WITH_RECEIVER_SCHEMA.extend({
cv.GenerateID(): cv.declare_id(CoolixClimate),
})
def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
yield climate_ir.register_climate_ir(var, config)