mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 17:05:21 +01:00
Wizard board name fixes (#787)
* Sort board names in wizard * Fix board name in invalid board error message
This commit is contained in:
parent
9fb60b8015
commit
6542be5588
1 changed files with 2 additions and 2 deletions
|
@ -220,7 +220,7 @@ def wizard(path):
|
||||||
else:
|
else:
|
||||||
safe_print("For example \"{}\".".format(color("bold_white", 'nodemcuv2')))
|
safe_print("For example \"{}\".".format(color("bold_white", 'nodemcuv2')))
|
||||||
boards = list(ESP8266_BOARD_PINS.keys())
|
boards = list(ESP8266_BOARD_PINS.keys())
|
||||||
safe_print("Options: {}".format(', '.join(boards)))
|
safe_print("Options: {}".format(', '.join(sorted(boards))))
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
board = safe_input(color("bold_white", "(board): "))
|
board = safe_input(color("bold_white", "(board): "))
|
||||||
|
@ -228,7 +228,7 @@ def wizard(path):
|
||||||
board = vol.All(vol.Lower, vol.Any(*boards))(board)
|
board = vol.All(vol.Lower, vol.Any(*boards))(board)
|
||||||
break
|
break
|
||||||
except vol.Invalid:
|
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()
|
safe_print()
|
||||||
sleep(0.25)
|
sleep(0.25)
|
||||||
safe_print()
|
safe_print()
|
||||||
|
|
Loading…
Reference in a new issue