1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-22 05:02:23 +01:00

Supply return_type for more lambdas

This commit is contained in:
Otto Winter
2019-01-03 20:39:54 +01:00
parent 815da05b29
commit 907be3025c
14 changed files with 38 additions and 29 deletions

View File

@@ -4,7 +4,7 @@ import esphomeyaml.config_validation as cv
from esphomeyaml.const import CONF_ID, CONF_LAMBDA, CONF_UART_ID
from esphomeyaml.cpp_generator import Pvariable, add, get_variable, process_lambda
from esphomeyaml.cpp_helpers import setup_component
from esphomeyaml.cpp_types import App, PollingComponent
from esphomeyaml.cpp_types import App, PollingComponent, void
DEPENDENCIES = ['uart']
@@ -24,7 +24,8 @@ def to_code(config):
nextion = Pvariable(config[CONF_ID], rhs)
if CONF_LAMBDA in config:
for lambda_ in process_lambda(config[CONF_LAMBDA], [(NextionRef, 'it')]):
for lambda_ in process_lambda(config[CONF_LAMBDA], [(NextionRef, 'it')],
return_type=void):
yield
add(nextion.set_writer(lambda_))