Iphone and HA Companian App

My Iphone sometimes resets by itself the Location from Always to When Used. Is this normal and can it be sorted out ?

I do not know iPhones og har well, but Android have a system that removes permissions after a certain time unless the app have been set to not being handled by this "Cleanup".

Thanks. I may have resolved this by asking Google Gemini which gave me a series of steps to do the same as you suggest with Android.

How did you solve it? I'm having the same problem with my device.

Google Gemini

That is a known iOS behavior that can be incredibly frustrating, especially when it breaks your Home Assistant location automations and geofencing!

iOS has strict privacy guardrails and will periodically prompt you with a popup saying something like, "Home Assistant has been using your location in the background. Do you want to continue allowing this?" If you accidentally dismiss it, tap the wrong option, or if iOS decides to "optimize" background usage during an update, it will automatically downgrade the permission from Always to While Using the App.

To fix this and keep it from resetting, you need to adjust both your iOS settings and a couple of toggles inside the Home Assistant Companion app.


1. Fix the iOS System Settings

First, let's force iOS to give the permission back:

  • Open the Settings app on your iPhone.
  • Scroll down to the bottom and tap on Home Assistant.
  • Tap on Location.
  • Change the selection back to Always.
  • Crucial Step: Make sure the Precise Location toggle right below it is turned ON. Without this, iOS only gives Home Assistant an approximate location, which ruins geofencing.

2. Configure the Home Assistant App Settings

Next, open your Home Assistant app and ensure its internal location trackers are actively telling iOS it needs background data:

  • Go to Settings > Companion App.
  • Tap on Manage Sensors.
  • Tap on Location Sensors.
  • Ensure that Background Location and Zone Location are enabled.

3. Prevent iOS from "Optimizing" the App

iOS will sometimes aggressively restrict apps you haven't opened in a while. To prevent this:

  • Go back to your iPhone's main Settings > General > Background App Refresh.
  • Make sure Background App Refresh is turned ON globally, and specifically enabled for Home Assistant in the list below.
  • Note: If your iPhone is frequently in Low Power Mode (the yellow battery icon), iOS automatically disables background location updates entirely. If you rely heavily on geofencing, try to keep Low Power Mode off.

A Quick Automation Workaround

If iOS still insists on dropping the permission after a few weeks, a clever workaround used by the Home Assistant community is to create a local notification.

Inside the Home Assistant Companion App settings (Settings > Companion App > Settings), look for Location Background Tracking. You can enable a persistent or frequent background update trigger here. Keeping the app active via an occasional background shortcut or widget on your iPhone screen also forces iOS to recognize it as an "actively used" app, preventing the automated permission downgrade.