Android: Battery level sensor no longer updating with device tracker updates

Created on 29 Mar 2020  路  3Comments  路  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):
This was working as expected in builds 156 and lower
Description of problem:

The battery level sensor does not seem to be updating as fast as it was. The device tracker battery level attribute is updating faster than the sensor. The battery level sensor no longer updates every 15 minutes either. The sensor does update when the charging status changes but it should also update when location updates are sent. The device tracker battery level should always match the battery level sensor.

Traceback (if applicable):


Screenshot of problem:
image

image

Additional information:

bug sensor-tracking

Most helpful comment

The location sensor is different than the rest of the sensors. It only updates when the OS tells us that a new location is ready for us. The rest of the sensors update when ever the location updates or every 15 minutes (ish). That would let them allow the values to be out of sync on the HA side. I agree with @balloob and will remove the battery level from the location attributes.

All 3 comments

We should drop battery level from the device tracker entity now that we have a sensor.

In addition to removing it we should probably research why the sensor is now behind in updates to the device tracker. I would expect to see both update at the same time.

The location sensor is different than the rest of the sensors. It only updates when the OS tells us that a new location is ready for us. The rest of the sensors update when ever the location updates or every 15 minutes (ish). That would let them allow the values to be out of sync on the HA side. I agree with @balloob and will remove the battery level from the location attributes.

Was this page helpful?
0 / 5 - 0 ratings