Check lambdas for return statement (#539)

This commit is contained in:
Otto Winter
2019-05-10 22:13:17 +02:00
committed by GitHub
parent 9dd9e523ed
commit 953d7f6193
15 changed files with 30 additions and 16 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ CustomSwitchConstructor = custom_ns.class_('CustomSwitchConstructor')
CONFIG_SCHEMA = cv.Schema({
cv.GenerateID(): cv.declare_id(CustomSwitchConstructor),
cv.Required(CONF_LAMBDA): cv.lambda_,
cv.Required(CONF_LAMBDA): cv.returning_lambda,
cv.Required(CONF_SWITCHES):
cv.ensure_list(switch.SWITCH_SCHEMA.extend({
cv.GenerateID(): cv.declare_id(switch.Switch),