New iCloud Component 2 Factor Auth

I decided to give the iCloud component another try with the update, however I can’t seem to figure out for the life of me where I enter the two factor code. I’ve checked my components under Dev Tools / State but do not see a new device.

What am I missing? Probably something super simple.

Think I might have figured it out by appending one of the codes it generated to the end of the iCloud password in configuration.yaml. Same method some older Apple devices use. Not sure if this is the official way to do it, but seems to work.

Same here… Cannot get it to prompt for 2nd step p/w input anywhere…

Agreed was expecting a configurator card. Looks like my attempt to append the 2nd factor to my password didn’t work. Soon as I left home last night it endlessly started prompting me to approve a device on my phone. Had to remotely remove the iCloud component.

Openend an issue to see if I can get to the bottom of it.

Hopefully we can figure out a way to get this working with 2FA

I too am experiencing the same issue (constant iCloud 2F requests)

Has this issue been fixed? I’m using 2FA and I can’t get this component to work properly. Am I missing anything? I tried adding the code to the end of my password but that doesn’t seem to work correctly.

I just tried to enable icloud where I am using 2fa (i.e. where you get a pop up on device with a 6 digit code, NOT where an SMS is sent) and it’s not working.
Docs say 2fa not supported: https://home-assistant.io/components/device_tracker.icloud/
:frowning:

I gave up on the iCloud component long ago. I’ve used locative for a long time and it’s rock solid and more in line with the functionality I wanted.

Originally it was thought 2 factor would work with the new component but it turned out to be similart to how it worked previously with 2 step authentication (something different). Documentation was updated, not sure if this is going to be solved anytime soon, but I haven’t really looked into it lately.

I just enabled 2fa on my icloud account and I managed to get it working with HA.
On the first pop-up choose your trusted device (0 in my case) then accept the request on the iDevice and, on the second pop-up, insert the code you received via SMS not the code given by the iDevice.

Enjoy

1 Like

Hmm. I don’t get a code via SMS, only the pop-up on the device. :confused:

Strange: I got both: my setup is simply

device_tracker:
  - platform: icloud
    username: [email protected]
    password: ########
    account_name: ########

And I got the pop-up in the UI that asked to me the trusted device to use for authentication.
On the mobile I got the notification and following the code. After a few seconds I got also the SMS with another code.

First tried with the code received from the notification but didn’t worked then with the code in the SMS.

KR
fakezeta

Mine’s even shorter…

  platform: icloud
  username: !secret icloud_username
  password: !secret icloud_password

I’ve still never had an SMS so haven’t been able to continue, my tracking and automation isn’t working any more :-/

i found that i couldn’t get it working with the 2 factor authentication but after changing my icloud to 2 step verification i got homeassistant working. Not entirely sure of the difference. Hope this helps point people in the right direction.

https://appleid.apple.com

is where i changed from 2 step auth to 2 step verification

2 Step (older method) is supported 2 factor is not, they are two separate things. The documentation calls out 2 factor as being supported.

Any idea if this is going to be supported in the (near ;)) future?

It is now working with 2fa enabled. Click on the iCloud configure option in the main screen. Put a 0 (zero) in the inputbox. You will receive a text message with a six digit code. Enter this code in the new iCloud pop-up box. After that it will work

Without meaning to bring up an old thread, but having got frustrated with having to use 2FA on my iCloud account I’ve come up with the following solution to this issue;
Create an Input Boolean (‘Me Home/Away’) pass that to HomeKit and then use an automation to turn it on when I arrive home and another automation in HomeKit when I leave.
Hope this helps someone.

Another approach is to use the iCloud3 device tracker which supports tracking devices using the iOS app, find-my-phone (2fa accounts) and find-my-friends which lets you track a 2fa account when set up as a friend of a non-2fa account.

Plus a lot more. The latest version 1.1.0 is at the end of beta testing and would have been released if I had not gone out of town.

Go here for more information about the beta release.
Go here for all the supporting files and other information.