From 90c3b94237d6259c7c04aebedc28e88c87713a5d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 5 Mar 2026 13:14:58 -1000 Subject: [PATCH] tweaks --- esphome/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index 46a07de1cf4..082a0b06abb 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -260,10 +260,10 @@ def choose_upload_log_host( if ( purpose == Purpose.UPLOADING and CORE.data.get(KEY_CORE, {}).get(KEY_TARGET_PLATFORM) == PLATFORM_RP2040 + and (picotool := _find_picotool()) is not None + and detect_rp2040_bootsel(picotool) > 0 ): - picotool = _find_picotool() - if picotool is not None and detect_rp2040_bootsel(picotool) > 0: - options.append(("RP2040 BOOTSEL (via picotool)", "BOOTSEL")) + options.append(("RP2040 BOOTSEL (via picotool)", "BOOTSEL")) if purpose == Purpose.LOGGING: if has_mqtt_logging():