Skip to content

Allows to filter history by event kind: 'motion', 'on_demand', 'ding' - #20

Merged
tchellomello merged 2 commits into
devfrom
history_by_kind
Mar 10, 2017
Merged

Allows to filter history by event kind: 'motion', 'on_demand', 'ding'#20
tchellomello merged 2 commits into
devfrom
history_by_kind

Conversation

@tchellomello

Copy link
Copy Markdown
Member

Description

Allows to filter history by event kind: 'motion', 'on_demand', 'ding'

Examples

In [13]: len(mydoorbell.history(limit=100))
Out[13]: 100

In [14]: len(mydoorbell.history(limit=100, kind='motion'))
Out[14]: 55

In [15]: len(mydoorbell.history(limit=100, kind='ding'))
Out[15]: 20

In [16]: len(mydoorbell.history(limit=100, kind='on_demand'))
Out[16]: 25

@tchellomello tchellomello added this to the v.1.1.2 milestone Mar 10, 2017
Comment thread ring_doorbell/__init__.py Outdated
return None

def history(self, limit=30, timezone=None):
def history(self, limit=30, timezone=None, kind=None) :

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace before ':'

@tchellomello
tchellomello merged commit 33f7885 into dev Mar 10, 2017
@tchellomello
tchellomello deleted the history_by_kind branch March 10, 2017 23:37
tchellomello added a commit that referenced this pull request Mar 13, 2017
* Moved subscribed and subscribed_motion attributes to doorbell devices only

* Allows option to make token persistent and register push_notify_urls

* Introduced check_alerts() method (#17)

* added initial control to alert notifications

* Removed JSON from tests

* Make lint happy

* Update README

* Only publish PUSH url if we have one

* Display error message only if in debug

* override default URL

* Make check alerts a callable function

* Removed extra space

* Move inside the try/except for safeness

* Introduced mecanism to save current alert state to a pickle file to allow concurrent objects to share alert notifications

* Moved self._alert_cache position

* version bump 0.1.1

* Allows to filter history by event kind: 'motion', 'on_demand', 'ding' (#20)

* Allows to filter history by event kind: 'motion', 'on_demand', 'ding'

* Fixed whitespace

* Unittests (#22)

* Introduced base skeleton for unittest

* Added thanks to the http://www.android-x86.org/ community

* Added basic structure for docs (#24)

* Added basic structure for docs

* fixed lint
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants