mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
show attribute in log message
This commit is contained in:
@@ -705,7 +705,7 @@ bool AnalogSensor::get_value_info(JsonObject output, const char * cmd, const int
|
|||||||
output["api_data"] = data; // always as a string
|
output["api_data"] = data; // always as a string
|
||||||
return true;
|
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
|
return true; // found a match, exit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 we're filtering on an attribute, go find it
|
||||||
if (attribute_s) {
|
if (attribute_s) {
|
||||||
#if defined(EMSESP_DEBUG)
|
|
||||||
EMSESP::logger().debug("[DEBUG] fetching single attribute %s", attribute_s);
|
|
||||||
#endif
|
|
||||||
if (json.containsKey(attribute_s)) {
|
if (json.containsKey(attribute_s)) {
|
||||||
std::string data = json[attribute_s].as<std::string>();
|
std::string data = json[attribute_s].as<std::string>();
|
||||||
output.clear();
|
output.clear();
|
||||||
output["api_data"] = data; // always as string
|
output["api_data"] = data; // always as string
|
||||||
return true;
|
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;
|
return true;
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ bool TemperatureSensor::get_value_info(JsonObject output, const char * cmd, cons
|
|||||||
output["api_data"] = data; // always as string
|
output["api_data"] = data; // always as string
|
||||||
return true;
|
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
|
return true; // found a match, exit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ bool WebCustomEntityService::get_value_info(JsonObject output, const char * cmd)
|
|||||||
output["api_data"] = data; // always as string
|
output["api_data"] = data; // always as string
|
||||||
return true;
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user