mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-03-28 20:17:11 +01:00
webapp: show precise data age for inverters and introduce and use DataAgeDisplay component
thanks to @schlimmchen
This commit is contained in:
@@ -146,6 +146,7 @@ void WebApiWsLiveClass::generateInverterCommonJsonResponse(JsonObject& root, std
|
||||
root["name"] = inv->name();
|
||||
root["order"] = inv_cfg->Order;
|
||||
root["data_age"] = (millis() - inv->Statistics()->getLastUpdate()) / 1000;
|
||||
root["data_age_ms"] = millis() - inv->Statistics()->getLastUpdate();
|
||||
root["poll_enabled"] = inv->getEnablePolling();
|
||||
root["reachable"] = inv->isReachable();
|
||||
root["producing"] = inv->isProducing();
|
||||
|
||||
Reference in New Issue
Block a user