show freemem in KB, add more HA icons

This commit is contained in:
proddy
2021-05-10 14:10:16 +02:00
parent 37bee39cea
commit bc69ca0a9b
5 changed files with 43 additions and 8 deletions

View File

@@ -474,7 +474,7 @@ bool System::heartbeat_json(JsonObject & doc) {
doc["dallasfails"] = EMSESP::sensor_fails();
}
#ifndef EMSESP_STANDALONE
doc["freemem"] = ESP.getFreeHeap();
doc["freemem"] = ESP.getFreeHeap() / 1000L; // kilobytes
#endif
if (analog_enabled_) {
@@ -897,7 +897,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & json
node["version"] = EMSESP_APP_VERSION;
node["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
#ifndef EMSESP_STANDALONE
node["freemem"] = ESP.getFreeHeap();
node["freemem"] = ESP.getFreeHeap() / 1000L; // kilobytes
#endif
node = json.createNestedObject("Status");