mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
show unknown command in API output so its same as a log
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user