Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ring_doorbell/__init__.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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