seamapi / public-tracker

0 stars 0 forks source link

Seam sometimes returns a negative battery level #9

Closed seveibar closed 1 year ago

seveibar commented 1 year ago

Prerequisites

Description

Sometimes Seam will return a negative battery level, the battery level will eventually correct itself.

Steps to Reproduce

Can be reproduced on some August devices, presumably when August returns a negative battery level

itelo commented 1 year ago

If the provider returns a negative number, we could either:

or

seveibar commented 1 year ago

@itelo for the purpose of computing the average battery level, we want to ignore storing the negative value in the capability state for the device.

For displaying the unknown battery level for the customer, instead of returning "unknown" we'll want to leave the battery level undefined, I believe there's something like device.properties.battery.status which can be set to "unknown"

itelo commented 1 year ago

I believe the "unknown" comes from the frontend.