Pixel 7 Pro Charge Type not updating unless app used recently

So, I’ve come across a lot of posts about this, but nothing so far has worked.

Pixel 7 Pro
Android 14 Dec Security update

Home Assistant

  • Core 2023.12.3
  • Supervisor 2023.12.0
  • Operating System 11.2
  • Frontend 20231208.2
    *App 2023.10.2-full

I use Nabu Casa and appears to be functioning (can access system outside of network)

If I open the app on my phone, charge type will update instantly. I’m specifically trying to trigger on the wireless type. It will continue to do so until the Home Assistant app is either closed (swipe up from bottom of screen and close app) or probably goes to sleep (keep opening apps until it stops working).

App Battery Usage: Unrestricted

I have followed the instructions for a clean connection (clear data of app, delete from HA, Reboot HA, Reconnect to HA on app).

If I enable persistent connections while on home WIFI, the notifications work even if I close the app (swipe up from bottom of screen and close app).

Is this just the expected behavior of the app when not running a persistent connection? Are there other things I could try/look at? It really seems like when the app sleeps or is closed, none of the notifications are pushed to the server.

Thanks in advance!

My charge type on my pixel 8 pro updates immediately. Check the companion app logs for errors

I’ll look through the logs again tomorrow when I have a moment, but nothing stood out last time I reviewed them.

Are you sure that your app is closed and that you are not running any kind of persistent connection? Mine works if the app is open, recently opened, or persistent connection is enabled, but if I close the app (using the swipe up from bottom on pixel and then swiping up to close the app) it stops sending updates if no type of persistent connection is selected.

The app needs to remain running in the background in order to get updates. Closing the app stops the sensor worker from running.

So maybe this is just how the system works. Everything updates on the Pixel 7 Pro up until the app is closed or probably goes to sleep. Even with the unrestricted setting for the battery, if I open and use several other apps on my phone, the phone eventually stops sending the charge type sensor update. However, if I turn on WIFI persistent connection on the HA App, it works even if I close the app. It isn’t exactly how I would expect the app to behave, but it works well enough with the WIFI Persistent connection setting.

Persistent connection keeps the app alive even even you think you closed it, that’s the intention behind that notification.

For anyone else that comes across this thread. Enabling the “persistent connection” under settings > companion app > select your home > Persistent connection and then select “On home WiFi only” fixed my issue.