From 87395d259ee53c8e50a2bbc29525bdeff0a97493 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:22:39 +1200 Subject: [PATCH] Allow "--device SERIAL" on cli to flash only via serial (#5351) --- esphome/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/__main__.py b/esphome/__main__.py index 9fac8cd605..cf540f58ba 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -85,6 +85,8 @@ def choose_upload_log_host( options = [] for port in get_serial_ports(): options.append((f"{port.path} ({port.description})", port.path)) + if default == "SERIAL": + return choose_prompt(options, purpose=purpose) if (show_ota and "ota" in CORE.config) or (show_api and "api" in CORE.config): options.append((f"Over The Air ({CORE.address})", CORE.address)) if default == "OTA":