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

@@ -8,7 +8,7 @@ from esphomeyaml.const import CONF_CS_PIN, CONF_DC_PIN, CONF_EXTERNAL_VCC, CONF_
CONF_MODEL, CONF_RESET_PIN, CONF_SPI_ID
from esphomeyaml.cpp_generator import Pvariable, add, get_variable, process_lambda
from esphomeyaml.cpp_helpers import gpio_output_pin_expression, setup_component
from esphomeyaml.cpp_types import App, PollingComponent
from esphomeyaml.cpp_types import App, PollingComponent, void
DEPENDENCIES = ['spi']
@@ -60,7 +60,7 @@ def to_code(config):
add(ssd.set_external_vcc(config[CONF_EXTERNAL_VCC]))
if CONF_LAMBDA in config:
for lambda_ in process_lambda(config[CONF_LAMBDA],
[(display.DisplayBufferRef, 'it')]):
[(display.DisplayBufferRef, 'it')], return_type=void):
yield
add(ssd.set_writer(lambda_))