show unknown command in API output so its same as a log

This commit is contained in:
proddy
2024-07-17 09:14:39 +02:00
parent f34f503b19
commit 0c1db756c7

View File

@@ -757,10 +757,11 @@ bool EMSESP::get_device_value_info(JsonObject root, const char * cmd, const int8
} }
// if the EMS device was valid, but the cmd not found show an error // if the EMS device was valid, but the cmd not found show an error
if (found_device) { if (found_device) {
// return EMSESP::return_not_found(root, "poep", cmd); // not found root["message"] = std::string("unknown command ") + cmd;
return false;
} }
// check for other devices... // check for other non EMS devices...
// temperature sensor // temperature sensor
if (devicetype == DeviceType::TEMPERATURESENSOR) { if (devicetype == DeviceType::TEMPERATURESENSOR) {