0.32.1 ICloud Lost Device

Hello Guys, i’ve a problem.
Can you tell me how i can use device_tracker.icloud_lost_iphone to send an alert to specific device?

I’ve write this script but don’t work

sequence:

  • service: device_tracker.icloud_lost_iphone
    data:
    device_name: device_tracker.iphonedxcoco2
1 Like

I would also like to know this… I can not find any info on where device_name is derived from.

Also, the icloud platform does not correctly assign account_name. We have 3 icloud accounts in the device tracker configuration, with all 3 user/password logins as well as account_name variables, and yet it randomly assigns account names to the wrong devices.

I have an iPhone and iPad under my icloud account, yet sometimes my devices show as one of the other two accounts under account_name, so I am unable to reference devices by account name as there is no rhyme or reason for how account_name variables are assigned, even after hard coding them in the configuration.yaml under device trackers.

There needs to be a LOT more documentation on using the icloud services, especially the icloud_lost_iphone and icloud_update services in reference to account_name and device_name, but even with more documentation, the account_name feature is definately broken and needs to be fixed.

ok…i think the same!

Did you guys ever figure this out?

I managed to get this working. I found that I needed to make the following change to icloud.py to get the device name to properly match.
https://github.com/ipreston/icloudplatform/commit/2e14d5bc8f367a6130f2e5dd26628c4df9112610

Once that change is made, the this should work:

sequence:
  - service: device_tracker.icloud_lost_iphone
    data:
      device_name: iphonedxcoco2

How would I go about changing this file in Hassio? I can’t seem to find the file at all…

same issue here with hassio :hushed:

Hi @preston - any idea how to fix this in the most recent releases? I can’t find that code line that you have changed and device_name still doesn’t seem to work…

For those of you using hassio, you would need to modify the docker image.

Thanks @zarthan - I was planning to go down the custom component route and copy out the icloud.py code from the HA repo and then tweak the code as per @preston’s post above… The problem is that the line of code @preston tweaked doesn’t seem to exist in the current icloud.py on the HA repo… :confused:

That post was a year ago. A lot has changed in the past year so I am not surprised. You would be further ahead if you created a fresh post and laid out what you have done / tried etc.

I suggest you start a new thread linking to an existing thread. The thread has already ran its course years ago. Seeing Home Assistant version tells me the thread is a blast from the past, so I suggest you don’t resurrect the thread.

Click in the date in upper-right corner of the post (such as mine) and click in “New Topic.”

Thanks @GraysonPeddie - done here