Merge pull request #42 from DaanSelen/lastconlastaddr

Display lastaddr and lastconnected in device object.
This commit is contained in:
Josiah Baldwin
2025-04-01 11:51:43 -07:00
committed by GitHub

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":