From 6542be5588025ce11154b1a3169b527bfc7a3f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 22 Oct 2019 00:06:11 +0300 Subject: [PATCH] Wizard board name fixes (#787) * Sort board names in wizard * Fix board name in invalid board error message --- esphome/wizard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/wizard.py b/esphome/wizard.py index 34ff0ec6c7..f9dce7143a 100644 --- a/esphome/wizard.py +++ b/esphome/wizard.py @@ -220,7 +220,7 @@ def wizard(path): else: safe_print("For example \"{}\".".format(color("bold_white", 'nodemcuv2'))) boards = list(ESP8266_BOARD_PINS.keys()) - safe_print("Options: {}".format(', '.join(boards))) + safe_print("Options: {}".format(', '.join(sorted(boards)))) while True: board = safe_input(color("bold_white", "(board): ")) @@ -228,7 +228,7 @@ def wizard(path): board = vol.All(vol.Lower, vol.Any(*boards))(board) break except vol.Invalid: - safe_print(color('red', "Sorry, I don't think the board \"{}\" exists.")) + safe_print(color('red', "Sorry, I don't think the board \"{}\" exists.".format(board))) safe_print() sleep(0.25) safe_print()