tidy up commands for temperature sensor

This commit is contained in:
proddy
2024-01-28 16:36:18 +01:00
parent eec0051997
commit 040954bb70
10 changed files with 119 additions and 133 deletions

View File

@@ -152,12 +152,13 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject input) {
#if defined(EMSESP_STANDALONE)
Serial.print(COLOR_YELLOW);
Serial.print("web response code: ");
Serial.println(ret_codes[return_code]);
Serial.print("data: ");
if (output.size()) {
serializeJsonPretty(output, Serial);
serializeJson(output, Serial);
}
Serial.println();
Serial.print(" (response code ");
Serial.print(ret_codes[return_code]);
Serial.println(")");
Serial.print(COLOR_RESET);
#endif
}

View File

@@ -134,6 +134,7 @@ bool WebSchedulerService::command_setvalue(const char * value, const std::string
// process json output for info/commands and value_info
bool WebSchedulerService::get_value_info(JsonObject output, const char * cmd) {
// check of it a 'commmands' command
if (Helpers::toLower(cmd) == F_(commands)) {
output[F_(info)] = Helpers::translated_word(FL_(info_cmd));
output[F_(commands)] = Helpers::translated_word(FL_(commands_cmd));