Be kind to the history log with last_seen

This commit is contained in:
Kendell R authored and Thomas Lovén committed 2020-10-21 19:20:41 +02:00
1 parent 7743e29bf2
commit 8710bdc31d
1 file changed
+1
+1
View File
@@ -21,6 +21,7 @@ class BrowserModCamera(Camera, BrowserModEntity):
self.last_seen = None
def updated(self):
if self.last_seen is not None and (datetime.now() - self.last_seen).seconds > 5:
self.last_seen = datetime.now()
self.schedule_update_ha_state()