What location tracking does in Home Assistant
Location tracking in the Home Assistant mobile app lets your phone send its GPS location to your home automation system. This means your automations can respond to where you actually are — turning on lights when you arrive home, locking doors when everyone leaves, or sending alerts if a family member's phone stops moving unexpectedly.
The app does not send your location to Home Assistant's cloud servers or to anyone else. It sends directly to your own Home Assistant instance, which runs on hardware you control (usually a Raspberry Pi, NAS, or old computer in your home). Your location data stays on your network unless you explicitly set up remote access.
Before you enable tracking, understand the trade-off: the app needs permission to access your phone's GPS constantly, which uses battery. Most phones let you set this to "only while using the app" or "always", and "always" drains the battery faster but lets automations work even when the app is closed.
Key Takeaways
- Location tracking sends your phone's GPS coordinates only to your own Home Assistant system, not to external servers or the app developer.
- You control where the data goes and how long it stays — Home Assistant stores it locally on your device unless you set up cloud access.
- Enabling "always" location permission uses more battery than "while using the app", but only "always" lets automations trigger when the app is closed.
- The Home Assistant mobile app must have location permission turned on in your phone's settings before you can enable tracking inside the app.
Check your phone's location permission first
Before the Home Assistant app can track your location, your phone's operating system must grant it permission. This is separate from the setting inside the app itself.
On Android: Open Settings, go to Apps, find Home Assistant, tap Permissions, and look for Location. Tap it and choose either "Allow only while using the app" or "Allow all the time". If you see "Don't allow", the app cannot access your GPS at all. Choose "Allow all the time" if you want automations to work when the app is closed; choose "Allow only while using the app" if you want to save battery and only need location when you open the app.
On iPhone: Open Settings, scroll to Home Assistant, tap Location, and choose "While Using" or "Always". "Always" lets automations run in the background; "While Using" saves battery but only tracks when you open the app. If you see "Never", location is blocked entirely.
Enable location tracking inside the Home Assistant app
Once your phone permits location access, open the Home Assistant mobile app and navigate to the settings menu. Tap the three horizontal lines (hamburger menu) in the bottom right, then tap Settings.
Scroll down to the Companion App section and look for Location. Toggle it on. The app will now begin sending your location to your Home Assistant instance at regular intervals — usually every 5 to 10 minutes by default, though you can adjust this in Home Assistant's configuration if you have access to the YAML files.
After you enable it, go back to your Home Assistant dashboard on a computer or tablet. In the left sidebar, click Developer Tools, then States. Search for "device_tracker" and look for your phone's name. You should see latitude and longitude values updating. If you see nothing, check that your phone has an active internet connection to your home network (or to your Home Assistant remote access URL if you set that up).
Adjust battery and update frequency settings
The Home Assistant app has a separate battery optimization setting that controls how often it sends location updates. Open the app, go to Settings, scroll to Companion App, and look for Location Update Frequency or Battery Optimization.
If you choose "High Accuracy" or "Always", the app sends updates every few minutes but drains battery faster. If you choose "Balanced" or "Low Power", updates come less often (every 15 to 30 minutes) and use less battery. Some phones also let you set a threshold — for example, "only send an update if I've moved more than 100 meters" — which saves both battery and network traffic.
Test your choice for a few days. If automations are not triggering when you expect them, your update frequency may be too low. If your phone battery is draining noticeably, try a lower frequency or switch to "Allow only while using the app" in your phone's location permission.
Understand what data is stored and where
Home Assistant stores your location history in a database on your local device or server. By default, it keeps the last 10 days of location data. You can see this history in the Home Assistant dashboard under History or Logbook.
If you have set up remote access to Home Assistant (through Nabu Casa, a reverse proxy, or a VPN), your location data travels over that connection. If you have not set up remote access, location data only moves between your phone and your home network — it never leaves your home. Check your Home Assistant configuration to see whether remote access is enabled. If you are unsure, assume it is not, and your data stays local.
You can delete location history manually by going to Home Assistant Settings, then Devices & Services, then History, and clearing the database. You can also set Home Assistant to automatically purge location data older than a certain number of days — this is a setting in the Recorder integration, which you can adjust in Settings or in the configuration.yaml file if you have access to it.
Troubleshoot if location is not updating
If your phone's location is not appearing in Home Assistant, or if it updates only once and then stops, check these things in order:
First: Verify that your phone's location permission is set to "Always" (iPhone) or "Allow all the time" (Android). If it is set to "While Using", the app only tracks when it is open. Go back to your phone's Settings and check.
Second: Make sure the Home Assistant app has an active connection to your Home Assistant instance. Open the app and look at the top of the screen — you should see a green checkmark or a URL showing your connection is active. If you see a red X or an error, the app cannot reach Home Assistant, so it cannot send location data.
Third: Check that location tracking is actually enabled inside the app. Go to Settings, Companion App, and confirm the Location toggle is on (not grayed out).
Fourth: Restart the Home Assistant app. Close it completely (swipe it away from recent apps on Android, or swipe up on iPhone), wait 10 seconds, and open it again. Sometimes the location service needs to restart.
If location still is not updating after these steps, check your Home Assistant logs. Go to Settings, System, Logs, and search for "location" or your phone's device name. The logs will tell you whether Home Assistant is receiving location data from the app or whether the connection is failing.
Use location data in automations
Once location tracking is working, you can build automations that respond to your location. In Home Assistant, go to Settings, Automations, and create a new automation. Choose "Device" as the trigger type, select your phone, and look for a trigger like "Zone entered" or "Zone exited".
A zone is a geographic area you define — usually your home, your workplace, or a place you visit often. Home Assistant comes with a "Home" zone centered on your home coordinates. You can add more zones in Settings, Areas and Zones, then Zones. When your phone enters or leaves a zone, Home Assistant can trigger an action — turn on lights, send a notification, unlock a door, or anything else you have set up.
For example, you could create an automation that says "When my phone enters the Home zone, turn on the front porch light." Or "When my phone leaves the Home zone and my partner's phone is also away, lock the front door." These automations run on your local Home Assistant system and do not depend on cloud services.
Frequently Asked Questions
Does Home Assistant send my location to the cloud?
Not by default. Your location stays on your local Home Assistant system. If you have set up remote access through Nabu Casa, a reverse proxy, or a VPN, your location data travels over that connection, but it does not go to a third-party server unless you explicitly configure it. Check your Home Assistant remote access settings to see what is enabled.
Will location tracking drain my phone battery quickly?
It depends on your update frequency and your phone's location permission. "Always" permission with high-accuracy updates uses noticeably more battery than "While Using" permission. Start with "While Using" or a low update frequency (every 15 to 30 minutes) and increase it only if your automations need faster updates. Most users see a 5 to 15 percent battery impact.
Can I turn off location tracking for one person but keep it on for another?
Yes. Each phone running the Home Assistant app has its own location tracking setting. One family member can enable it while another disables it. In Home Assistant automations, you can reference specific phones — for example, "trigger when Mom's phone enters Home" — so automations respond only to the people you want.
What happens if my phone loses internet connection?
If your phone loses connection to your home network or your Home Assistant remote access URL, the app cannot send location updates. Once the connection returns, the app will resume sending location data. Home Assistant will show your last known location until a new update arrives.
Can I see my location history in Home Assistant?
Yes. Go to Home Assistant, click on your phone's device, and look for a History tab or Logbook entry. You will see a timeline of when you entered and left zones, and sometimes a map showing your recent locations. This history is stored locally on your Home Assistant system.