mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
only print API json when there is one after a call command
This commit is contained in:
@@ -397,11 +397,9 @@ void EMSESPShell::add_console_commands() {
|
|||||||
ok = Command::call(device_type, cmd, arguments[2].c_str(), atoi(arguments[3].c_str()), output);
|
ok = Command::call(device_type, cmd, arguments[2].c_str(), atoi(arguments[3].c_str()), output);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ok) {
|
if (ok && output.size()) {
|
||||||
shell.print(F("output: "));
|
|
||||||
serializeJson(doc, shell);
|
serializeJson(doc, shell);
|
||||||
shell.println();
|
shell.println();
|
||||||
shell.println();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[&](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) -> std::vector<std::string> {
|
[&](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) -> std::vector<std::string> {
|
||||||
|
|||||||
Reference in New Issue
Block a user