diff --git a/esphome/cpp_generator.py b/esphome/cpp_generator.py index 0e711f64e1..e2dbbf3d43 100644 --- a/esphome/cpp_generator.py +++ b/esphome/cpp_generator.py @@ -654,7 +654,7 @@ async def process_lambda( parameters: list[tuple[SafeExpType, str]], capture: str = "=", return_type: SafeExpType = None, -) -> LambdaExpression | None: +) -> Optional[LambdaExpression]: """Process the given lambda value into a LambdaExpression. This is a coroutine because lambdas can depend on other IDs,