initial commit

This commit is contained in:
2022-12-20 21:26:47 +01:00
commit 2962a6db69
722 changed files with 63886 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import select
from esphome.const import (
CONF_ID,
)
CONF_EHMTX = "ehmtx"
select_ns = cg.esphome_ns.namespace("esphome")
EHMTXSelect = select_ns.class_(
"EhmtxSelect", select.Select, cg.PollingComponent
)
CONFIG_SCHEMA = cv.All(
select.SELECT_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(EHMTXSelect),
}
).extend(cv.polling_component_schema("30s")),
)
async def to_code(config):
cg.add_define("USE_EHMTX_SELECT")
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
await select.register_select(var, config, options=[])