diff --git a/esphome/components/graphical_layout/text_panel.h b/esphome/components/graphical_layout/text_panel.h index 08e78c0325..bd497e2da9 100644 --- a/esphome/components/graphical_layout/text_panel.h +++ b/esphome/components/graphical_layout/text_panel.h @@ -19,7 +19,6 @@ class TextPanel : public LayoutItem { void render_internal(display::Display *display, display::Rect bounds) override; void dump_config(int indent_depth, int additional_level_depth) override; - void set_item_padding(int item_padding) { this->item_padding_ = item_padding; }; template void set_text(V text) { this->text_ = text; }; void set_font(display::BaseFont *font) { this->font_ = font; }; void set_foreground_color(Color foreground_color) { this->foreground_color_ = foreground_color; }; @@ -27,7 +26,6 @@ class TextPanel : public LayoutItem { void set_text_align(display::TextAlign text_align) { this->text_align_ = text_align; }; protected: - int item_padding_{0}; TemplatableValue text_{}; display::BaseFont *font_{nullptr}; display::TextAlign text_align_{display::TextAlign::TOP_LEFT}; diff --git a/esphome/components/graphical_layout/text_panel.py b/esphome/components/graphical_layout/text_panel.py index 002b3bce09..1f5b02aab1 100644 --- a/esphome/components/graphical_layout/text_panel.py +++ b/esphome/components/graphical_layout/text_panel.py @@ -7,7 +7,6 @@ graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout") TextPanel = graphical_layout_ns.class_("TextPanel") TextAlign = display_ns.enum("TextAlign", is_class=True) -CONF_ITEM_PADDING = "item_padding" CONF_TEXT_PANEL = "text_panel" CONF_FONT = "font" CONF_FOREGROUND_COLOR = "foreground_color" @@ -36,7 +35,6 @@ def get_config_schema(base_item_schema, item_type_schema): return base_item_schema.extend( { cv.GenerateID(): cv.declare_id(TextPanel), - cv.Optional(CONF_ITEM_PADDING, default=0): cv.int_, cv.Required(CONF_FONT): cv.use_id(font.Font), cv.Optional(CONF_FOREGROUND_COLOR): cv.use_id(color.ColorStruct), cv.Optional(CONF_BACKGROUND_COLOR): cv.use_id(color.ColorStruct), @@ -49,9 +47,6 @@ def get_config_schema(base_item_schema, item_type_schema): async def config_to_layout_item(pvariable_builder, item_config, child_item_builder): var = await pvariable_builder(item_config) - if item_padding_config := item_config[CONF_ITEM_PADDING]: - cg.add(var.set_item_padding(item_padding_config)) - panel_font = await cg.get_variable(item_config[CONF_FONT]) cg.add(var.set_font(panel_font))