Display lastaddr and lastconnected in device object.

This commit is contained in:
Daan
2025-03-20 23:55:13 +01:00
parent e226fff8dd
commit ab1fba5cc1

View File

@@ -482,6 +482,10 @@ class Session(object):
for node in nodes:
if node["node"].get("meshid", None):
node["node"]["mesh"] = mesh.Mesh(node["node"].get("meshid"), self)
if "lastConnect" in node and isinstance(node["lastConnect"], dict):
node["node"]["lastconnect"] = node["lastConnect"].get("time")
node["node"]["lastaddr"] = node["lastConnect"].get("addr")
del node["lastConnect"]
details = {}
for key, val in node.items():
if key != "node":