From 8852d50971ceeecdcd0cf7f758ef4eab20e76f55 Mon Sep 17 00:00:00 2001 From: Daniel Pavel Date: Wed, 12 Jun 2013 14:31:46 +0200 Subject: [PATCH] mark device status as inactive after idling out --- lib/logitech/unifying_receiver/status.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/logitech/unifying_receiver/status.py b/lib/logitech/unifying_receiver/status.py index 914a8e66..3cbc4436 100644 --- a/lib/logitech/unifying_receiver/status.py +++ b/lib/logitech/unifying_receiver/status.py @@ -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.