mark device status as inactive after idling out

This commit is contained in:
Daniel Pavel 2013-06-12 14:31:46 +02:00
parent 908f6763be
commit 8852d50971
1 changed files with 1 additions and 0 deletions

View File

@ -248,6 +248,7 @@ class DeviceStatus(dict):
self.read_battery(timestamp)
elif len(self) > 0 and timestamp - self.updated > _STATUS_TIMEOUT:
self._active = False
# If the device has been inactive for too long, clear out any known
# properties, they are most likely obsolete anyway.
# The battery level stays because it's unlikely to change much.