diff --git a/esphome/components/esp32/__init__.py b/esphome/components/esp32/__init__.py index 5019a192eb..f1fcae6c55 100644 --- a/esphome/components/esp32/__init__.py +++ b/esphome/components/esp32/__init__.py @@ -684,7 +684,7 @@ class _FrameworkMigrationWarning: shown = False -def _show_framework_migration_message(name: str) -> None: +def _show_framework_migration_message(name: str, variant: str) -> None: """Show a friendly message about framework migration when defaulting to Arduino.""" if _FrameworkMigrationWarning.shown: return @@ -698,9 +698,11 @@ def _show_framework_migration_message(name: str) -> None: f"💡 IMPORTANT: {name} doesn't have a framework specified!", ) + "\n\n" - + "Currently, ESP32 defaults to the Arduino framework.\n" + + f"Currently, {variant} defaults to the Arduino framework.\n" + color(AnsiFore.YELLOW, "This will change to ESP-IDF in ESPHome 2026.1.0.\n") + "\n" + + "Note: Newer ESP32 variants (C6, H2, P4, etc.) already use ESP-IDF by default.\n" + + "\n" + "Why change? ESP-IDF offers:\n" + color(AnsiFore.GREEN, " ✨ Up to 40% smaller binaries\n") + color(AnsiFore.GREEN, " 🚀 Better performance and optimization\n") @@ -745,7 +747,9 @@ def _set_default_framework(config): config[CONF_FRAMEWORK] = ARDUINO_FRAMEWORK_SCHEMA({}) config[CONF_FRAMEWORK][CONF_TYPE] = FRAMEWORK_ARDUINO # Show the migration message - _show_framework_migration_message(config.get(CONF_NAME, "Your device")) + _show_framework_migration_message( + config.get(CONF_NAME, "Your device"), variant + ) else: config[CONF_FRAMEWORK] = ESP_IDF_FRAMEWORK_SCHEMA({}) config[CONF_FRAMEWORK][CONF_TYPE] = FRAMEWORK_ESP_IDF