Skip to content

Commit

Permalink
Merge pull request #76 from tchellomello/master
Browse files Browse the repository at this point in the history
Version 0.1.9
  • Loading branch information
tchellomello committed Nov 29, 2017
2 parents 04c1758 + 6172dac commit d5593ea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
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

0 comments on commit d5593ea

Please sign in to comment.