Android: Battery state sensor not reporting charging but instead shows not_charging when plugged in

Created on 30 Mar 2020  路  11Comments  路  Source: home-assistant/android

Home Assistant Android version:
1.8.0.-157
Android version:
10
Phone model:
Pixel 4 XL
Home Assistant version:
0.107.1
Last working Home Assistant release (if known):
1.8.0-156
Description of problem:

After updating from build 156 to 157 I noticed that the battery state sensor no longer reports charging when plugged in and instead reports not_charging this also happens when I dock on the pixel stand. Even the attribute is_charging no longer updates properly in build 157 compared to 156. I verified this by rolling back to build 156 and forcing the app to update and I always saw charging for state and the attribute is_charging set to true. The charger_type attribute does update properly.

On build 157 when my phone is unplugged it properly states discharging

Traceback (if applicable):

n/a

Screenshot of problem:
When on build 157:
image

Compared to build 156:
image

Additional information:
Looks like the changes from #525 is causing this

bug sensor-tracking

All 11 comments

For me to on my OnePlus 6 same issue.
With latest versio.

So I do see it taking a while before the device realizes that the power incoming is enough to actually charge the device. @yoxjames maybe you can take a look into anything we can do about it?

Thats interesting on my end my phone can be plugged in for over 20 minutes and it still stays at not_charging it never updates even after 15 minutes has passed for the next update. I even saw my battery level rise as it stayed on not_charging. Also tried to force stop the app and reopen to trigger an update and it did not change.

image
It does update for me at some point.

ok I can try it again tonight and see if it does eventually changes over, maybe I was being too impatient but I thought that after 15 minutes it should definitely update.

Ok, I figured out how to force it to show "charging". I force stopped app, plugged charger in and then opened app. In this case it immediately shows "charging". In other cases it shows "not_charging".

So I did more testing on my end and actually ended up clearing data on the app to start fresh. Last night when I went to the charge I did not see not_charging immediately. It actually stayed on discharging for 15 minutes before updating to charging.

image

charger_type updates immediately

image

I wonder if clearing data was necessary here to clean up some things.

Just for comparisons sake here is my graph before updating to build 157

image

This is the night before my comment just above this. Whats interesting is the amount of times it flipped from not_charging to full compared to build 157 which looks much leaner.

I think this really may have been more of a bad data issue.

Instead of seeing not_charging first it just updates to charging during the next sensor update, charger_type still updates immediately.

image

image

@r3mcos3 and @klejejs @JBassett are you guys still seeing the same behavior? I wonder if you guys may need to clear data to get the same results I do? Im wondering if this is still really an issue or not if we had bad data to clear out.

For me it's working perfect now

Closing this issue as after clearing data I no longer see this issue. If anyone else is still experiencing it I suggest clearing data in the app and trying again. We can reopen this if we need to.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aleksandrov1995 picture aleksandrov1995  路  4Comments

Hypfer picture Hypfer  路  3Comments

CedrickFlocon picture CedrickFlocon  路  4Comments

jokerigno picture jokerigno  路  4Comments

Bruceforce picture Bruceforce  路  3Comments