Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ring_doorbell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def existing_doorbell_type_duration(self, value):
return True
return None

def history(self, limit=30, timezone=None):
def history(self, limit=30, timezone=None, kind=None):
"""Return history with datetime objects."""
# allow modify the items to return
params = {'limit': str(limit)}
Expand All @@ -508,6 +508,10 @@ def history(self, limit=30, timezone=None):
entry['created_at'] = tz_dt
else:
entry['created_at'] = utc_dt

if kind:
return list(filter(lambda array: array['kind'] == kind, response))

return response

@property
Expand Down