diff --git a/esphome/components/graphical_layout/text_run_panel.cpp b/esphome/components/graphical_layout/text_run_panel.cpp index 2b3a3b8366..7693f46237 100644 --- a/esphome/components/graphical_layout/text_run_panel.cpp +++ b/esphome/components/graphical_layout/text_run_panel.cpp @@ -134,10 +134,8 @@ void TextRunPanel::apply_alignment_to_lines_(std::vectortext_align_) & TEXT_ALIGN_Y_MASK); int16_t max_line_width = 0; - int16_t total_height = 0; for (const auto &line : lines) { max_line_width = std::max(line->total_width, max_line_width); - total_height += line->max_height; } int total_y_adjustment = 0;