Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.1.9 #76

Merged
merged 4 commits into from Nov 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions ring_doorbell/__init__.py
Expand Up @@ -253,3 +253,12 @@ def stickup_cams(self):
def doorbells(self):
"""Return a list of RingDoorBell objects."""
return self.__devices('doorbells')

def update(self):
"""Refreshes attributes for all linked devices."""
for device_lst in self.devices.values():
for device in device_lst:
if hasattr(device, "update"):
_LOGGER.debug("Updating attributes from %s", device.name)
getattr(device, "update")
return True
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@
setup(
name='ring_doorbell',
packages=['ring_doorbell'],
version='0.1.8',
version='0.1.9',
description='A Python library to communicate with Ring' +
' Door Bell (https://ring.com/)',
author='Marcelo Moreira de Mello',
Expand Down
2 changes: 2 additions & 0 deletions tests/test_base.py
Expand Up @@ -28,6 +28,8 @@ def setUp(self, mock):
self.ring_persistent = \
Ring(USERNAME, PASSWORD, cache_file=CACHE, persist_token=True)

self.assertTrue(hasattr(self.ring, "update"))

def cleanup(self):
"""Cleanup any data created from the tests."""
self.ring = None
Expand Down