Battery usage too high

On my S10+ (LineageOS 19.1), the home assistant companion app accounts for about 5% of the battery usage, even if not used at all (making it the top battery drainer of all user apps). This is even after I have disabled all sensors and re-enabled battery optimization. Screenshot of GSam Bettery Monitor after half a day without any usage of the app is attached. I also wonder what the app is doing in the background and why there has been a significant amount of data transfer. What can be the reason for this behaviour?

as you are on a custom ROM, you are most likely using the minimal version which does not have support for Firebase messaging so the device uses the persistent connection which on some devices may drain faster than others.

“Custom ROM” does not mean without Google Apps, even if I try to minimize this aspect. And even the most minimal GApps include FCM messaging. E.g. I sent and received dozens of Signal messages in the same period (also with FCM) , and Signal used only 2% of the battery despite longer screen-on-times.

it really depends on the version of the app you installed, if you installed the minimal version then it will not use FCM

Still I would start with the troubleshooting steps on inspecting high battery life.

I use the version from the PlayStore. The troubleshooting steps have all been applied already. I’m wondering if there is anything else running in the background - why should the app transfer 5MB of data without active usage? Is there a situation where Lovelace cards could be updated while in the background?

Even with all sensors disabled the app still checks in with the server every 15 minutes but that won’t make 5mb of data. Also if you have widgets the app will maintain a websocket permission when the screen is on to get entity updates so the widget is kept up to date. Those are still text updates.

There is a known issue if you use live view cameras where the stream never stops. You’ll need to remove those from the dashboard and ensure when you exit the app that they are not in view or opened.

At first thanks for the quick replies.
I don’t have any widgets, and I also have cleared app data and reconnected it to my home assistant instance.
I don’t have a live stream, but I use iframe cards to embed other sites. However I rarely use this dashboards and they were definitely not active in this period. Probably I should remove this iframes.
Is there any hint what I should search for in the logs to find the culprit?

If you suspect the iframe is the problem the only way you can research that is to use Webview Debugging or just remove it and see if the situation improves

https://companion.home-assistant.io/docs/integrations/android-webview#remote-debugging

You should also consider changing the default webview package to the one provided by Google as I can see it seems to be using the AOSP version which is commonly shipped with custom ROMs but ends up being incompatible in some cases.

I have removed several embedded iframes in Lovelace in which i displayed local weather maps etc. from external services. Moreover I removed the custom integration “Weather Radar Card”. All these include video streams from external sites and might lead to a similar situation like you describe here!? (I never really used them, so they should not have an open connection, but who knows…)
Whatever, over the last 12 hours the battery and data usage of the Android app has been reduced drastically (to neglegible if unuesed). l will observe it.