From ccf3da2a5aab0be231ce3b0b948eeeab15a835db Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 27 Aug 2019 22:00:34 +0200 Subject: [PATCH] Improve handling of no upload option Fixes https://github.com/esphome/issues/issues/596 --- esphome/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index 98d302c82b..bb41e43011 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -35,7 +35,9 @@ def get_serial_ports(): def choose_prompt(options): if not options: - raise ValueError + raise EsphomeError("Found no valid options for upload/logging, please make sure relevant " + "sections (ota, mqtt, ...) are in your configuration and/or the device " + "is plugged in.") if len(options) == 1: return options[0][1]