--- title: Apple iCloud description: Instructions on how to use iCloud to track devices in Home Assistant. ha_category: - Presence Detection - Sensor ha_iot_class: Cloud Polling ha_release: '0.10' ha_config_flow: true ha_codeowners: - '@Quentame' ha_domain: icloud --- The `icloud` integration allows you to detect presence using the [iCloud](https://www.icloud.com/) service. iCloud allows users to track their location on iOS devices. There is currently support for the following platforms within Home Assistant: - [Device Tracker](#device-tracker) - [Sensor](#sensor) It does require that your devices are registered with the [Find My](https://www.apple.com/uk/icloud/find-my/) service. ## Setup the integration There is two ways to integrate iCloud in Home Assistant ### Via the frontend Menu: *Configuration* -> *Integrations*. Search for "iCloud", add your credentials, click submit. If you add the integration for the first time for an account, and two-factor authentication is enabled: 1. After clicking submit, you will receive a verification code on your trusted iCloud devices. 2. Press Allow on your device, and enter the 6 digit code in Home Assistant. Finally, click Submit. 3. You are done! If you already added the integration before, you are done! ### Via the configuration file Add the following section to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry icloud: - username: USERNAME password: PASSWORD ``` {% configuration %} username: description: Your iCloud account email. required: true type: string password: description: Your iCloud account password. required: true type: string with_family: description: If you want to fetch your family devices. required: false default: false type: boolean max_interval: description: Maximum interval in minutes between subsequent location updates. This tracker uses dynamic intervals for requesting location updates. When the iPhone is stationary, the interval will eventually be set to `max_interval` to save battery. When the iPhone starts moving again, the interval will be dynamically updated to 1 min. Note that updating interval to 1 min might be delayed by maximum `max_interval` minutes. Minimum value is 1 min. required: false default: 30 type: integer gps_accuracy_threshold: description: iCloud location updates come with some gps_accuracy varying from 10 to 5000 meters. This setting defines the accuracy threshold in meters for a location update. Less accurate updates will be discarded by this tracker. This allows for more precise location monitoring and fewer false-positive zone changes. required: false default: 500 type: integer {% endconfiguration %}