iCloud custom_component device tracker that will not drain your battery


@walt thanks for this component.

I have added my iphone and it shows the location i.e. home etc fine but it says that the low power mode is false and device_status is offline. Is that normal?


Low Power Mode is a mode an ios device goes into when it drops below 20% battery (optionally i believe). Device status has at least 3 states I’ve seen: (Online, Offline, Pending). Not sure what criteria determines this. That could come from Apple via icloud api.


Hi to every one,

I’m using this custom_component (icloud2.py), but i don’t see my position in map or also the entity i can’t see it in my HA

I have file icloud2.py in this route:


and in logs i can see only this:

2018-09-05 23:04:01 WARNING (MainThread) [homeassistant.loader] You are using a custom component for device_tracker.icloud2 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

what’s happening?



Here is what I did. I use lovelace btw:

Check under de “states” -> http://yourdomain:8123/dev-state

Look for a something like: device_tracker.youriphonesname
(You can find your device name in your phone under: “Settings” > “General” > “Info

Then you have to add the below code to your ui-lovelace.yaml

  - type: map
    aspect_ratio: 62.5%
    default_zoom: 6
      - device_tracker.nameofyourdevice
      - zone.home

You should get something like this:


Is there a way to show this map as a card in hassio without lovelace?


Maybe this is usable for you:



Did you figure this out yet. Remember you won’t see your device in the map if you’re in your ‘home’ zone which is setup default in Home Assistant.


So I got this working for me, after a couple of hours.
First I had to understand how the filter works.
The filter is just filtering the names of devices. For example:
My iPhone is called ‘Myiphone’, my wifes iPhone is called ‘wife’.
Hers wasn’t displayed with this component.
If a devices for example is called ‘notaniphone’ it would be displayed!

Next think to figure out was how to have multiple filters installed.
The filter is not an array, it is a simple String.
So filter like
filter_devices: 'phone', 'wife'

  - 'phone'
  - 'wife'

won’t work.
So what do you have to do? You need double the entrys

  - platform: icloud2
    username: !secret icloud_username
    password: !secret icloud_password
    account_name: 'Phone'
    filter_devices: 'phone'
  - platform: icloud2
    username: !secret icloud_username
    password: !secret icloud_password
    account_name: 'Wife' 
    filter_devices: 'wife'

This is how it worked now!
I will test it the next couple of days.


I’ve switched from the original iCloud tracker to this, however it seems that the old one is still running every minute. My server log shows this every minute:
2018-11-27 00:16:57 INFO (SyncWorker_10) [pyicloud.base] Authentication completed successfully

How can I remove the old implementation completely?


I just deleted the old icloud section in the configuration!
It works perfectly fine.
I would love to See this in the next hass.io release!


I have removed the old configuration and added the icloud2 platform, but it is still polling every minute…