mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 14:38:10 +01:00
lambda condition should return (#1833)
This commit is contained in:
parent
824f3187ac
commit
3d917d0b7e
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ async def not_condition_to_code(config, condition_id, template_arg, args):
|
|||
return cg.new_Pvariable(condition_id, template_arg, condition)
|
||||
|
||||
|
||||
@register_condition("lambda", LambdaCondition, cv.lambda_)
|
||||
@register_condition("lambda", LambdaCondition, cv.returning_lambda)
|
||||
async def lambda_condition_to_code(config, condition_id, template_arg, args):
|
||||
lambda_ = await cg.process_lambda(config, args, return_type=bool)
|
||||
return cg.new_Pvariable(condition_id, template_arg, lambda_)
|
||||
|
|
Loading…
Reference in a new issue