Battery usage

The Home Assistant app is now accounting for 16% of battery usage on my Android 7 tablet, even though I have scarcely used it. Is anyone else experiencing this?

What sensors do you have enabled? You may want to go in the settings and disable the ones that you don’t need. In the beginning new sensors were automatically enabled but that is no longer the case after the latest release.

Sorry, don’t understand. Normal battery usage for an Android app is around 2%. Even the screen is only using 18%. For what it’s worth, though, they’re nearly all disabled.

Yes on my phone it uses 1-2% by the end of the day. The sensors update in the background and there is now a foreground service that allows the update to be more reliable instead of doze forcing it to be killed until the next time the app was started.

On my Android phone the Home Assistant app is using around 3% of the battery. I notice that the Play Store update which was installed yesterday on the tablet has not gone through yet on the phone. Could the update have something to do with it? I’m pretty sure this issue has only come up in the last 24 hours. Normally the battery saver on the tablet complains about anything that’s hogging more than about 5% and the HA app has never been an issue before.

There’s now a foreground sensor worker that will run while your tablet is sleeping, it grabs data from the sensors on a 15-minute periodic interval and sends them to HA as a foreground service. Try turning off some sensors like the light sensor or proximity on the tablet. The sensors before were all enabled once created so you would’ve had to have turned them off manually after updating the app. The new ones added in the last release are off by default, in fact the default setting now is for all to be disabled with the exception of battery.

Since the update prior to the latest one (2.1.0?), I too have had serious issues with battery. I used to be able to get a day from the phone, now I find I have to charge it in the arvo, and then put it back on in the evening or it will go flat.

HA app battery use can sit anywhere between 8-20% for the day. Its gotten better after turning off all the sensors that were enabled by default, but still not great. With the default sensors enabled (post update, everything was turned on) it was at that 20% mark.

Running it on a Pixel 2 with Android 10 installed, and only the location sensor, battery sensor and wifi sensor enabled.

I have every sensor enabled on my pixel 4 XL and the app only uses 1-2% by the end of the day.

I have now disabled every sensor and battery usage is back to normal. Not sure what this says about the quality of the HA app. :face_with_raised_eyebrow:

@Stiltjack if you paid attention to what I said up above that we had left all sensors enabled by default in one release and had corrected that in the other. I can tell you that on my pixel 4 xl with every single sensor enabled I hardly ever see the app register on my device at the end of the day. Battery usage will vary from device to device which was why I recommended you check the sensors. Not every device has the same set of sensors and not every device has the same manufacturer. Rest assured future sensors are not enabled by default so this will not be an issue.

1 Like

Did you ever manage to figure this one out? The companion app is just obliterating my phones battery non stop like 20% per day. I have minimum location accuracy set to 200m.

Not at this stage, I’ve just had to charge a lot more. I’ve turned off all the new sensors but that didnt help. Tried erasing HA application and resetting it up from scratch, no change either.

Some days are worse than others for some reason. Some days, I get almost what I would have prior to the update, some are really bad. The worst I’ve seen, as far as I can tell, HA blew through 60% of my battery in 1.5 hours. I couldn’t stop the drain, so after rebooting the phone, it seemed to go back to something reasonably normal.

Do you guys by chance have lovelace live view picture entity cards setup? If so there is a known issue about it. Check the app data usage that would be an indication about battery drain. Here is the issue: https://github.com/home-assistant/android/issues/979

Yeah I do but I also have the automatically close connection option checked in my user profile. I wasn’t however aware of the bug mentioned.

Actually I do as well. Would this update in the background though if not using the app? I saw the other user checked an option to disable background refresh so I may go and find out where to change that on my end and see if it helps at all. Thank you for the tip.

Edit: just checked and always close connection was checked on for me. Checked data usage and it’s fairly normal only around 10mb a day.

what sensors do you have enabled?

I have:

  • Phone State
  • Battery Level
  • Battery State
  • Is Charging
  • Wifi SSID
  • Geolocation (Single, background, zone all set to 200m)

The rest I’ve disabled. Today the battery usage is much better but still around 5%, but I can live with that over yesterday’s usage. Still pings for location quite often -> Samsung Location SDK is quite high as well. Would I set the minimum GPS accuracy higher or lower to test if battery usage improves? I was thinking higher such as 500m but that might send more notifications to the server.

accuracy only matters for what we SEND to home assistant…it wont stop the phone from receiving updates and then processing them…if anything you would lower the number to get less updates sent but that doesnt mean we wont request more location updates

I’m also experiencing some heavy battery drain with the HA android app.

Yesterday, I had a “default” configuration for sensors enabled on my Pixel 3, and the battery was drained 31% by the HA app after 16 hours use. After discovering that, I disabled ALL sensors and so far today the HA app has used 8% after 4 hours off the charger. On track for another 31-32% battery drain day with 0 sensors enabled. Any logical suggestions for me to try? I still have all the sensors disabled. Can I stop the sensor update worker service?

EDIT - I just disabled background data usage on the app with 8% usage on the app. Will update again later with feedback. The app has used 95 MB of data in the background in only 2 days. whew That’s a lot of data for a few sensor updates.

The data usage also contains the webview data such as your lovelace cards and the entire frontend and backend calls etc.