leeyuentuen / polestar_api

Polestar Api - Home Assistant Component
MIT License
112 stars 18 forks source link

bugfix: odometer #74

Closed leeyuentuen closed 5 months ago

leeyuentuen commented 6 months ago

this should be wrong data from polestar prevent this issue

maybe set max limit of 1.000.000

Screenshot_2024-01-07-15-58-34-23_c3a231c25ed346e59462e84656a70e50

leeyuentuen commented 5 months ago

I've put a max limit to prevent to high value

ScooterisT5 commented 5 months ago

Odometer has changed to unknown

leeyuentuen commented 5 months ago

open the entity and change the unit of measurement from m to km

i saw that i need to put the limit higher then 1000000

ScooterisT5 commented 5 months ago

OK, confirmed. Switch to KM works as expected. Also if i change to Mi, and back.

m0wlheld commented 5 months ago

Confirmed. Works with m and km. Does not work with cm, though ;) Is there really a need for a limit?

leeyuentuen commented 5 months ago

@m0wlheld As you see on the opening post image, sometimes, weird responses from Polestar make the graph go high

m0wlheld commented 5 months ago

@m0wlheld As you see on the opening post image, sometimes, weird responses from Polestar make the graph go high

Speaking of which: The API currently reports 0 km (infact 600m) for the Odometer. It's the same for this HA integration and for the Polestar site. So - not a bug here.

grafik

m0wlheld commented 5 months ago

It gets even better: Currently the API is reporting 2^31m, so the Odometer display 2.147.484 km ... looks like they are trying fix something.

leeyuentuen commented 5 months ago

It gets even better: Currently the API is reporting 2^31m, so the Odometer display 2.147.484 km ... looks like they are trying fix something.

in the log? or showed in the gui that make spikes?

m0wlheld commented 5 months ago

It‘s reported wrong by the remote Polestar API. You cannot fix it.

leeyuentuen commented 5 months ago

It‘s reported wrong by the remote Polestar API. You cannot fix it.

but this you saw the value on your home assistant gui? normally i have skip this high value

leeyuentuen commented 5 months ago

release at https://github.com/leeyuentuen/polestar_api/releases/tag/1.6.0