diff --git a/src/console.cpp b/src/console.cpp index 821352617..033cf49e3 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -375,9 +375,11 @@ void EMSESPShell::add_console_commands() { serializeJsonPretty(doc, shell); shell.println(); return; + } else if (!ok) { + shell.println(F("Unknown command, value, or id.")); + shell.print(F("Available commands are: ")); + Command::show(shell, device_type); } - shell.print(F("Unknown command. Available commands are: ")); - Command::show(shell, device_type); }, [&](Shell & shell __attribute__((unused)), const std::vector & arguments) -> std::vector { if (arguments.size() == 0) {