Skip to content
Merged
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
5 changes: 2 additions & 3 deletions homeassistant/components/icloud/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ def setup(self) -> None:
with_family=self._with_family,
)

if not self.api.is_trusted_session or self.api.requires_2fa:
# Session is no longer trusted
if self.api.requires_2fa:
# Trigger a new log in to ensure the user enters the 2FA code again.
raise PyiCloudFailedLoginException

Expand Down Expand Up @@ -163,7 +162,7 @@ def update_devices(self) -> None:
if self.api is None:
return

if not self.api.is_trusted_session or self.api.requires_2fa:
if self.api.requires_2fa:
self._require_reauth()
return

Expand Down