From 806cbd0bdd30f8c9252bd0e0353adf6fa17b63c2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 20 Jan 2026 14:55:58 -1000 Subject: [PATCH] [libretiny] Disable unused LWIP statistics to save RAM and flash --- esphome/components/libretiny/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/esphome/components/libretiny/__init__.py b/esphome/components/libretiny/__init__.py index 8318722b80..503ec7e167 100644 --- a/esphome/components/libretiny/__init__.py +++ b/esphome/components/libretiny/__init__.py @@ -382,4 +382,11 @@ async def component_to_code(config): "custom_options.sys_config#h", _BK7231N_SYS_CONFIG_OPTIONS ) + # Disable LWIP statistics to save RAM - not needed in production + # Must explicitly disable all sub-stats to avoid redefinition warnings + cg.add_platformio_option( + "custom_options.lwip", + ["LWIP_STATS=0", "MEM_STATS=0", "MEMP_STATS=0"], + ) + await cg.register_component(var, config)