Fixing ghost devices in Unifi

This commit is contained in:
Stefan Hoffmann 2024-09-25 18:33:41 +02:00
parent ff5cf755aa
commit e6583918c1

View File

@ -133,6 +133,7 @@ func processUnifiAPI(s int) ([]node, []link, error) {
// INFLUX STOP // INFLUX STOP
//log.Println(currentDevice.Mac) //log.Println(currentDevice.Mac)
if currentDevice.Mac != "" {
nodes = append(nodes, node{ nodes = append(nodes, node{
Firstseen: "0", Firstseen: "0",
Lastseen: time.Unix(int64(currentDevice.LastSeen), 0).Format(iso8601), Lastseen: time.Unix(int64(currentDevice.LastSeen), 0).Format(iso8601),
@ -167,6 +168,7 @@ func processUnifiAPI(s int) ([]node, []link, error) {
Model: model, Model: model,
}) })
} }
}
return nodes, links, err return nodes, links, err
} }