Bump iCloud to 0.9.2 + fix setup log (#31273)
- pyicloud to 0.9.2 - fix log `ERROR (MainThread) [homeassistant.config_entries] icloud.async_setup_entry did not return boolean`
This commit is contained in:
1 parent
fa15bead94
commit
ec4ccb10ec
6 files changed
+14
-9
No files matched your search
@@ -122,6 +122,9 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
|
||||
hass, username, password, icloud_dir, max_interval, gps_accuracy_threshold,
|
||||
)
|
||||
await hass.async_add_executor_job(account.setup)
|
||||
if not account.devices:
|
||||
return False
|
||||
|
||||
hass.data[DOMAIN][username] = account
|
||||
|
||||
for component in ICLOUD_COMPONENTS:
|
||||
@@ -207,3 +210,5 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
|
||||
hass.services.async_register(
|
||||
DOMAIN, SERVICE_ICLOUD_UPDATE, update_account, schema=SERVICE_SCHEMA
|
||||
)
|
||||
|
||||
return True
|
||||
@@ -98,7 +98,7 @@ class IcloudFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
errors[CONF_USERNAME] = "login"
|
||||
return await self._show_setup_form(user_input, errors)
|
||||
|
||||
if self.api.requires_2fa:
|
||||
if self.api.requires_2sa:
|
||||
return await self.async_step_trusted_device()
|
||||
|
||||
return self.async_create_entry(
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "Apple iCloud",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/icloud",
|
||||
"requirements": ["pyicloud==0.9.1"],
|
||||
"requirements": ["pyicloud==0.9.2"],
|
||||
"dependencies": [],
|
||||
"codeowners": ["@Quentame"]
|
||||
}
|
||||
Reference in new issue
Block a user