From fcdaa923c511aaf82f0e59d4cf8d12400094729a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 15 Dec 2015 10:42:05 +0100 Subject: [PATCH] Update docstrings --- .../components/device_tracker/icloud.py | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/homeassistant/components/device_tracker/icloud.py b/homeassistant/components/device_tracker/icloud.py index a617fda9411..927f4ba6fe9 100644 --- a/homeassistant/components/device_tracker/icloud.py +++ b/homeassistant/components/device_tracker/icloud.py @@ -1,16 +1,8 @@ """ homeassistant.components.device_tracker.icloud -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Device tracker platform that supports scanning iCloud devices. -It does require that your device has beend registered with Find My iPhone. - -Note: that this may cause battery drainage as it wakes up your device to -get the current location. - -Note: You may receive an email from Apple stating that someone has logged -into your account. - For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.icloud/ """ @@ -31,9 +23,7 @@ DEFAULT_INTERVAL = 8 def setup_scanner(hass, config, see): - """ - Set up the iCloud Scanner - """ + """ Set up the iCloud Scanner. """ from pyicloud import PyiCloudService from pyicloud.exceptions import PyiCloudFailedLoginException from pyicloud.exceptions import PyiCloudNoDevicesException @@ -57,21 +47,17 @@ def setup_scanner(hass, config, see): return def keep_alive(now): - """ - Keeps authenticating icloud connection - """ + """ Keeps authenticating iCloud connection. """ api.authenticate() - _LOGGER.info("Authenticate against iCloud.") + _LOGGER.info("Authenticate against iCloud") track_utc_time_change(hass, keep_alive, second=0) def update_icloud(now): - """ - Authenticate against iCloud and scan for devices. - """ + """ Authenticate against iCloud and scan for devices. """ try: # The session timeouts if we are not using it so we - # have to re-authenticate. This will send an email. + # have to re-authenticate. This will send an email. api.authenticate() # Loop through every device registered with the iCloud account for device in api.devices: