mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 19:38:30 +02:00
Fix Custom Components No Name (#395)
* Fix Custom Components No Name Fixes https://github.com/esphome/ESPHome-Core/issues/445 * Fix
This commit is contained in:
@@ -3,7 +3,7 @@ import voluptuous as vol
|
||||
from esphomeyaml.components import output
|
||||
import esphomeyaml.config_validation as cv
|
||||
from esphomeyaml.const import CONF_ID, CONF_LAMBDA, CONF_OUTPUTS, CONF_TYPE
|
||||
from esphomeyaml.cpp_generator import process_lambda, variable
|
||||
from esphomeyaml.cpp_generator import process_lambda, variable, Pvariable
|
||||
from esphomeyaml.cpp_types import std_vector
|
||||
|
||||
CustomBinaryOutputConstructor = output.output_ns.class_('CustomBinaryOutputConstructor')
|
||||
@@ -61,8 +61,9 @@ def to_code(config):
|
||||
|
||||
rhs = klass(template_)
|
||||
custom = variable(config[CONF_ID], rhs)
|
||||
for i, sens in enumerate(config[CONF_OUTPUTS]):
|
||||
output.register_output(custom.get_output(i), sens)
|
||||
for i, conf in enumerate(config[CONF_OUTPUTS]):
|
||||
var = Pvariable(conf[CONF_ID], custom.get_output(i))
|
||||
output.register_output(var, conf)
|
||||
|
||||
|
||||
BUILD_FLAGS = '-DUSE_CUSTOM_OUTPUT'
|
||||
|
||||
Reference in New Issue
Block a user