mark device status as inactive after idling out
This commit is contained in:
parent
908f6763be
commit
8852d50971
|
@ -248,6 +248,7 @@ class DeviceStatus(dict):
|
||||||
self.read_battery(timestamp)
|
self.read_battery(timestamp)
|
||||||
|
|
||||||
elif len(self) > 0 and timestamp - self.updated > _STATUS_TIMEOUT:
|
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
|
# If the device has been inactive for too long, clear out any known
|
||||||
# properties, they are most likely obsolete anyway.
|
# properties, they are most likely obsolete anyway.
|
||||||
# The battery level stays because it's unlikely to change much.
|
# The battery level stays because it's unlikely to change much.
|
||||||
|
|
Loading…
Reference in New Issue