From 6b59d01dd2ea3d56cc51bd563421e15be75bbfc2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 22 Mar 2026 11:20:22 -1000 Subject: [PATCH] touch ups --- esphome/cpp_generator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/esphome/cpp_generator.py b/esphome/cpp_generator.py index a1e4c2ac59..da10567f5c 100644 --- a/esphome/cpp_generator.py +++ b/esphome/cpp_generator.py @@ -580,9 +580,7 @@ def Pvariable(id_: ID, rhs: SafeExpType, type_: "MockObj" = None) -> "MockObj": if type_ is not None: id_.type = type_ - is_new = isinstance(rhs, MockObj) and rhs._is_new_expr - - if is_new: + if isinstance(rhs, MockObj) and rhs._is_new_expr: # For 'new' allocations, use placement new into static storage # to avoid heap fragmentation on embedded devices. the_type = id_.type