1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-21 20:52:20 +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

@@ -7,7 +7,7 @@ import esphomeyaml.config_validation as cv
from esphomeyaml.const import CONF_ADDRESS, CONF_DIMENSIONS, CONF_ID, CONF_LAMBDA
from esphomeyaml.cpp_generator import Pvariable, add, process_lambda
from esphomeyaml.cpp_helpers import setup_component
from esphomeyaml.cpp_types import App
from esphomeyaml.cpp_types import App, void
DEPENDENCIES = ['i2c']
@@ -28,7 +28,8 @@ def to_code(config):
add(lcd.set_address(config[CONF_ADDRESS]))
if CONF_LAMBDA in config:
for lambda_ in process_lambda(config[CONF_LAMBDA], [(LCDDisplayRef, 'it')]):
for lambda_ in process_lambda(config[CONF_LAMBDA], [(LCDDisplayRef, 'it')],
return_type=void):
yield
add(lcd.set_writer(lambda_))