From c564c7361769c116a07ebb127c9453ec09b75699 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Thu, 17 Dec 2015 13:31:33 -0700 Subject: [PATCH] Return true when iCloud finishes setting up Otherwise an error will be reported even though it set up correctly. --- homeassistant/components/device_tracker/icloud.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/device_tracker/icloud.py b/homeassistant/components/device_tracker/icloud.py index fcb808894d5..76046552551 100644 --- a/homeassistant/components/device_tracker/icloud.py +++ b/homeassistant/components/device_tracker/icloud.py @@ -32,7 +32,7 @@ def setup_scanner(hass, config, see): if username is None or password is None: _LOGGER.error('Must specify a username and password') - return + return False try: _LOGGER.info('Logging into iCloud Account') @@ -42,7 +42,7 @@ def setup_scanner(hass, config, see): verify=True) except PyiCloudFailedLoginException as error: _LOGGER.exception('Error logging into iCloud Service: %s', error) - return + return False def keep_alive(now): """ Keeps authenticating iCloud connection. """ @@ -83,3 +83,5 @@ def setup_scanner(hass, config, see): minute=range(0, 60, config.get(CONF_INTERVAL, DEFAULT_INTERVAL)), second=0 ) + + return True