diff --git a/src/analogsensor.cpp b/src/analogsensor.cpp index 39902f7f1..c07135672 100644 --- a/src/analogsensor.cpp +++ b/src/analogsensor.cpp @@ -705,7 +705,7 @@ bool AnalogSensor::get_value_info(JsonObject output, const char * cmd, const int output["api_data"] = data; // always as a string return true; } - return EMSESP::return_not_found(output, "attribute", sensor_name); // not found + return EMSESP::return_not_found(output, attribute_s, sensor_name); // not found } return true; // found a match, exit } diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index d2f255ef2..b3d65fdd5 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -1598,16 +1598,13 @@ bool EMSdevice::get_value_info(JsonObject output, const char * cmd, const int8_t // if we're filtering on an attribute, go find it if (attribute_s) { -#if defined(EMSESP_DEBUG) - EMSESP::logger().debug("[DEBUG] fetching single attribute %s", attribute_s); -#endif if (json.containsKey(attribute_s)) { std::string data = json[attribute_s].as(); output.clear(); output["api_data"] = data; // always as string return true; } - return EMSESP::return_not_found(output, "attribute", command_s); // not found + return EMSESP::return_not_found(output, attribute_s, command_s); // not found } return true; diff --git a/src/temperaturesensor.cpp b/src/temperaturesensor.cpp index 6919cc054..d94ce1255 100644 --- a/src/temperaturesensor.cpp +++ b/src/temperaturesensor.cpp @@ -402,7 +402,7 @@ bool TemperatureSensor::get_value_info(JsonObject output, const char * cmd, cons output["api_data"] = data; // always as string return true; } - return EMSESP::return_not_found(output, "attribute", sensor_name); // not found + return EMSESP::return_not_found(output, attribute_s, sensor_name); // not found } return true; // found a match, exit } diff --git a/src/web/WebCustomEntityService.cpp b/src/web/WebCustomEntityService.cpp index 612f86b64..94f538861 100644 --- a/src/web/WebCustomEntityService.cpp +++ b/src/web/WebCustomEntityService.cpp @@ -325,7 +325,7 @@ bool WebCustomEntityService::get_value_info(JsonObject output, const char * cmd) output["api_data"] = data; // always as string return true; } - return EMSESP::return_not_found(output, "attribute", command_s); // not found + return EMSESP::return_not_found(output, attribute_s, command_s); // not found } }