Closed jstewart99 closed 4 years ago
That's just an artifact of the way the UniFi controller reports the data. The "last_seen" field from the controller is not updated in real time. You go by the sensor state of the device - if it's ON, then the device is online. If it's OFF, then it's off-line and the offline time is somewhat accurate. It's not updated in real time, so it's only approximate.
It's currently a float. I guess I could convert to a integer before I save it.
I could also force it to zero if it's online. I guess that makes more sense.
Fixed in next release. Both rounding and forcing to zero.
Created a new device with v 0.12 (my phone). Device presently shows Online, but shows offline_seconds of 63.473367. I assume this happened when I walked briefly out of wifi range, however now that I'm back IN range, shouldn't it update the offline_seconds back to 0? Seems like that value isn't ever going to reset.
Also if you could just round the seconds to the nearest second, I'm not sure anyone needs millionths of a second or whatever that shows. ;-)