Be kind to the history log with last_seen

This commit is contained in:
Kendell R 2020-09-11 07:14:36 -07:00 committed by Thomas Lovén
parent 7743e29bf2
commit 8710bdc31d

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()