18 lines
629 B
Python
18 lines
629 B
Python
|
import esphome.codegen as cg
|
||
|
import esphome.config_validation as cv
|
||
|
from esphome import automation
|
||
|
from esphome.components import output
|
||
|
from esphome.const import CONF_ID
|
||
|
|
||
|
hoermann_cover_ns = cg.esphome_ns.namespace('hoermann_door')
|
||
|
HoermannCoverLight = hoermann_cover_ns.class_('NbsLightOutput', output.BinaryOutput, cg.Component)
|
||
|
|
||
|
CONFIG_SCHEMA = output.BINARY_OUTPUT_SCHEMA.extend({
|
||
|
cv.GenerateID(): cv.declare_id(HoermannCoverLight)
|
||
|
}).extend(cv.COMPONENT_SCHEMA)
|
||
|
|
||
|
|
||
|
def to_code(config):
|
||
|
var = cg.new_Pvariable(config[CONF_ID])
|
||
|
yield cg.register_component(var, config)
|
||
|
yield output.register_output(var, config)
|