From 076313b85073f9974dac9195fbec510ba17358e3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 16 Oct 2025 14:09:09 -1000 Subject: [PATCH] [core] Fix IndexError when OTA devices cannot be resolved --- esphome/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index d9bdfb175b..d7f11feef9 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -185,7 +185,9 @@ def choose_upload_log_host( else: resolved.append(device) if not resolved: - _LOGGER.error("All specified devices: %s could not be resolved.", defaults) + raise EsphomeError( + f"All specified devices {defaults} could not be resolved. Is the device connected to the network?" + ) return resolved # No devices specified, show interactive chooser