espHome-NBS-files/external_components/hoermann_door/cover.py

20 lines
647 B
Python
Raw Permalink Normal View History

import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import automation
from esphome.components import cover
from esphome.const import CONF_ID
hoermann_cover_ns = cg.esphome_ns.namespace('hoermann_door')
HoermannDoor = hoermann_cover_ns.class_('HoermanDoor', cover.Cover, cg.Component)
CONFIG_SCHEMA = cover.COVER_SCHEMA.extend({
cv.GenerateID(): cv.declare_id(HoermannDoor)
}).extend(cv.COMPONENT_SCHEMA)
def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
yield cg.register_component(var, config)
2024-05-02 10:17:43 +00:00
yield cover.register_cover(var, config)
cg.add_library("plerup/EspSoftwareSerial", "8.2.0")