mirror of
https://github.com/jdillenburg/esphome.git
synced 2026-01-10 07:10:39 -07:00
18 lines
494 B
Python
18 lines
494 B
Python
import esphome.codegen as cg
|
|
import esphome.config_validation as cv
|
|
from esphome.const import CONF_ID
|
|
|
|
DEPENDENCIES = ['uart']
|
|
AUTO_LOAD = ['sensor']
|
|
|
|
tfmini_ns = cg.esphome_ns.namespace('tfmini')
|
|
TFMiniComponent = tfmini_ns.class_('TFMiniComponent', cg.Component)
|
|
|
|
CONFIG_SCHEMA = cv.Schema({
|
|
cv.GenerateID(): cv.declare_id(TFMiniComponent)
|
|
}).extend(cv.COMPONENT_SCHEMA)
|
|
|
|
async def to_code(config):
|
|
var = cg.new_Pvariable(config[CONF_ID])
|
|
await cg.register_component(var, config)
|