question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Massive battery consumption regardless of settings

See original GitHub issue

Home Assistant Android version: 2022.6.0-full

Android version: 12

Phone model: Pixel 6

Home Assistant version: 2022.5.5

Last working Home Assistant release (if known): unknown

Description of problem: The Homeassistant app has massive battery consumption (see screenshot). This is despite having the following settings configured:

  • sensor refresh interval is 15minutes
  • always use google notifications / never direct web socket
  • android battery setting for HomeAssistant is “restricted”, i.e. it should not even be possible to run in the background. I have no explanation how the app circumvents that. Maybe because I have some sensor widgets on my home screen? Even if the display is turned off, Homeassistant will always have a foreground activity.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):


Screenshot of problem: Screenshot_20220710-214525~2

Additional information:

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
hofstcommented, Jul 12, 2022

Only after a app restart, we also mention this in the description on the update frequency page.

Thanks, Indeed! Since it is the last sentence in a longer paragraph of explanations, this is rather easy to miss. Maybe as a small improvement there: I believe other apps will display an overlay once you change such a setting that says “Restart the app to apply new settings. Do you want to restart now? Yes/no”. But that’s only a minor improvement and this issue is about something different after all. I will give another update once I found out what actually caused the battery consumption (if I’m able to repro it again)

0reactions
dshokouhicommented, Jul 22, 2022
  • I enabled the background location sensor (every 15 minutes and not with high resolution): Result: The HA app has significant battery consumption and shows as having foreground activity 100% of the time. Not sure if that is expected? I would expect that a background location update with low resolution (no gps) every 15 minutes would not cause significant battery consumption or foreground activity all the time. This is on Android 12 and a Pixel 6. My wife has the same config on a Huawei Mate 20 Pro but there is not much battery consumption there. I wonder if either Huawei has implemented a better battery manager or if this is a problem with Android 12.

I think you need to give this page a read: https://companion.home-assistant.io/docs/core/location#android-location-sensors

It is not every 15 minutes but every minute but can be as high as every 30 seconds if other apps on your device are getting location updates

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crazy Battery Drain on a two week old iPhone 13 Pro Max.
You can optimize your battery life by turning off Location Services for the app. Turn off in Settings > Privacy > Location Services....
Read more >
Any solution for terrible battery performance on Surface Pro 8
... battery, 50% drain with less than an hour of use seems like an issue. Any suggestions? Regardless of any minor background setting...
Read more >
How to save battery life on your Android phone - The Verge
Medium power saving mode blocks apps from operating in the background and turns off Always On Display. Optimized is the setting I use...
Read more >
A huge guide to all the settings you can enable/disable to ...
Battery life is going to massively differ between people due to what apps are being used - something as simple as browsing the...
Read more >
[Notebook] Troubleshooting - How to fix the short battery life ...
If no issue found, it means the battery health is good, but maybe there are some applications, software, or system settings causing the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found