The HomeAssistant iOS is to blame for high battery drain
iOS device model, version and app version
Model Name: iPhone 15 Pro Max Software Version: iOS 17.0.3 App version: 2023.471
Home Assistant Core Version
2023.10.0
Describe the bug A few days ago the battery began to discharge quickly. I see in the settings that the HA app consumed half the charge in 24 hours, although I opened it only a few times.
To Reproduce Just use HA
Expected behavior Low impact on battery consumption as before.
Screenshots
Additional context
I downloaded the logs from the HA app, but I don’t know whether there is sensitive personal information there or not, so I haven’t published them yet.
Same problem on iPhone 14 Pro with iOS 17.0.3
EDIT: It seems like HA app runs some type of "music", because my headphones, which are connected to my iphone and mac, only focus on the iphone and do not switch to the mac if i start there any media.
oh wow never checked that in battery settings but now it makes sense (iPhone 12 mini iOS 17.0.3)
I have uninstalled the app for now because its background activity is eating up all my battery! I have to charge my iPhone in the middle of the day, which I have never done before. When will this be fixed?
I have this issue too. 65 hours of background activity in 10 days..
The time in the background doesn't correlate to battery usage, so it's normal to have 14h50m, but it's more interesting to see what's the battery usage (%)
The time in the background doesn't correlate to battery usage, so it's normal to have 14h50m, but it's more interesting to see what's the battery usage (%)
Just look. Screenshot in first message. The HA in the background eats up about 50% of the battery. After prohibiting the application from running in the background in the iOS settings, the situation has improved noticeably, but you also have to kill the HA after each launch.
Sorry, I missed that both were from your device. I will keep track of that, currently I don't see the same issue on my device, did you try to remove specific permissions and see if it improves? For example, just disable location permission for HA app
I think it’s an iOS issue and not with the app. I’m now on 17.2 beta and everything is back to normal
It's possible the Local Push extension went haywire, generally this happens when there's low overall battery use and it percolates up to the top.
I think it’s an iOS issue and not with the app. I’m now on 17.2 beta and everything is back to normal
Hmm, hundreds of other applications are installed and working, including background and geolocation, but the problem is only with HA. And is this an iOS problem? But what kind of coincidence?
Disable Local Push if you do not want the app to do this. https://companion.home-assistant.io/docs/notifications/notification-local
Disable Local Push if you do not want the app to do this. https://companion.home-assistant.io/docs/notifications/notification-local
Thanks, but I need this feature, it's one of the best features. Maybe the developers will fix this better?
I think it’s an iOS issue and not with the app. I’m now on 17.2 beta and everything is back to normal
Hmm, hundreds of other applications are installed and working, including background and geolocation, but the problem is only with HA. And is this an iOS problem? But what kind of coincidence?
Out of curiosity, what other apps with the same local push extension are you using? I can install them and see how it behaves on my phone too
I don't see any problems with push. Again, I have disabled background updates and geolocation for the Companion app in the iOS settings, but I continue to receive push notifications. I don’t know what functionality might have stopped working, maybe I don’t use it. But now there is no such problem with huge battery consumption from HA.
So maybe the problem is not Local Push after all? But I still have to kill the Application after each opening, otherwise it will drain the battery again. This is a bug that needs to be fixed, and Local Push is not to blame.
I am also seeing very high battery drain, since upgrading to iOS 17.1 from HA. Bizarrely the problem appears to be worse when the phone is switched to “Low Power Mode”, which I believe disables background refresh. The problem is also worse when off the home network, and thus needing mobile data.
Ran into the same problem just yesterday afternoon. It is really strange because there was no update done either on the app or the iPad or the iPhone or HA itself. All have the latest version installed. It is really killing my devices battery.
Local Push is not to blame
I was noticing high drain overnight (say, 2% an hour), and disabling local push eliminated it. With it off, my iPhone 12 mini can go several hours overnight not registering any change in battery charge.
It’s got me thinking there’s likely different issues here. For example, is it possible that there’s some wifi issue that can cause local push to use more battery? Or even something like Wifi 6 connections being able to go in a lower power mode than Wifi 5 connections?
I also wonder if we may be seeing the difference between devices with different battery sizes. My iPad Air has local push on, but it’s battery is so much larger that idle drain appears to be very low even with local push enabled.
What do you have the Periodic Update value set to in app settings under Sensors? Local Push will also update sensors while it is connected. The system keeps the Local Push websocket connection going but it should just be used for push and it'll do sensor updates while alive.
Sensors are currently set to 5 minutes.
I did also go through disabling all other functionality (location, background updates, etc) before I determined that local push was the issue.
Have the same issue.
Same issue for me this night from 90% at 01:00 to 75% at 08:00
Edit 09/01/2024 : disabling local push solve the issue
It appears that the HA iOS keeps a websocket open the entire time that Local Push is enabled. Whether or not this is worth it for you depends (privacy vs battery life). I'm not sure that we can immediately solve this as it will depend on whether iOS can sleep or not while a websocket is open.
We can imagine to send a generic notification via Apple servers to reconnect local socket and get the real notification
The intent of the local push is to avoid sending notifications to Apple. The function you are describing where a dummy push is sent and then HA would poll was declined by Apple, as I recall.
Any update on this issue?
Same here on iPad. The apps also drains the battery to 0%. It should reduce activity when battery is below 20% but better not to use power when not in use. Deleted the app and battery drainage stopped
Did anyone found a way to keep the basic HA app features without battery draining on his iOS devices?
Hitting this with an iPhone 12 Pro on IOS 17.4.1 and app 2024.4 as well.
Can we get some eyes on this?
Can we get some eyes on this?
Please check https://github.com/home-assistant/iOS/issues/2429#issuecomment-1891702710 and https://github.com/home-assistant/iOS/issues/2429#issuecomment-1848440402
Currently the "local push" feature has pros and cons:
Pro:
- Local push notification :)
- Refresh sensors more often
Con:
- Uses more battery
- Keeps websocket connection open
Try disabling local push and observing the app behavior for a week.