From 204da1af8b367a640096ad68f7486ed5aa425293 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 31 Jul 2025 20:03:31 -1000 Subject: [PATCH] preen --- esphome/__main__.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index 97ac8388cf..f0d85059d1 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -507,19 +507,17 @@ def command_compile(args: ArgsProtocol, config: ConfigType) -> int | None: def command_upload(args: ArgsProtocol, config: ConfigType) -> int | None: - devices: list[str] = args.device or [] - if not devices: - # No devices specified, use the interactive chooser - devices = [ - choose_upload_log_host( - default=None, - check_default=None, - show_ota=True, - show_mqtt=False, - show_api=False, - purpose="uploading", - ) - ] + # No devices specified, use the interactive chooser + devices: list[str] = args.device or [ + choose_upload_log_host( + default=None, + check_default=None, + show_ota=True, + show_mqtt=False, + show_api=False, + purpose="uploading", + ) + ] # Try each device until one succeeds for device in devices: