From 7c12f1a5bf341dcf261026cde4c60f7e98acaeb7 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 1 Aug 2025 10:06:16 -1000 Subject: [PATCH 1/2] [core] Update to use esptool instead of deprecated esptool.py --- esphome/__main__.py | 2 +- esphome/platformio_api.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index 341c1fa893..5e5c9ab556 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -277,7 +277,7 @@ def upload_using_esptool(config, port, file, speed): def run_esptool(baud_rate): cmd = [ - "esptool.py", + "esptool", "--before", "default_reset", "--after", diff --git a/esphome/platformio_api.py b/esphome/platformio_api.py index 7415ec9794..21124fc859 100644 --- a/esphome/platformio_api.py +++ b/esphome/platformio_api.py @@ -61,6 +61,7 @@ FILTER_PLATFORMIO_LINES = [ r"Advanced Memory Usage is available via .*", r"Merged .* ELF section", r"esptool.py v.*", + r"esptool v.*", r"Checking size .*", r"Retrieving maximum program size .*", r"PLATFORM: .*", From 3aaf11f4042695bfb94ccabd3ea9fb6f342ddc77 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 1 Aug 2025 11:15:34 -1000 Subject: [PATCH 2/2] missed some --- esphome/__main__.py | 2 +- esphome/components/esp32/post_build.py.script | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index 5e5c9ab556..9a79c0bde2 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -290,7 +290,7 @@ def upload_using_esptool(config, port, file, speed): mcu, "write_flash", "-z", - "--flash_size", + "--flash-size", "detect", ] for img in flash_images: diff --git a/esphome/components/esp32/post_build.py.script b/esphome/components/esp32/post_build.py.script index 586f12e00b..c995214232 100644 --- a/esphome/components/esp32/post_build.py.script +++ b/esphome/components/esp32/post_build.py.script @@ -93,8 +93,8 @@ def merge_factory_bin(source, target, env): "esptool", "--chip", chip, - "merge_bin", - "--flash_size", + "merge-bin", + "--flash-size", flash_size, "--output", str(output_path), @@ -110,7 +110,7 @@ def merge_factory_bin(source, target, env): if result == 0: print(f"Successfully created {output_path}") else: - print(f"Error: esptool merge_bin failed with code {result}") + print(f"Error: esptool merge-bin failed with code {result}") def esp32_copy_ota_bin(source, target, env):