Be kind to the history log with last_seen
This commit is contained in:
parent
7743e29bf2
commit
8710bdc31d
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user