Polestar: chargingStatus removed from API
Describe the bug
Polestar removed chargingStatus from the API which leads to an error and SoC is no longer available
Steps to reproduce
- Maintain a Polestar vehicle ...
Configuration details
vehicles:
- name: vehicle_0
title: Polestar
type: template
template: polestar
user: ****
password: ****
vin: ****
capacity: 82
Log details
[lp-1 ] ERROR 2026/05/21 13:41:24 charger soc: Message: Validation error of type FieldUndefined: Field 'chargingStatus' in type 'BatteryV2' is undefined @ 'carTelematicsV2/battery/chargingStatus', Locations: [{Line:1 Column:262}], Extensions: map[], Path: []
What type of operating system or environment does evcc run on?
Docker container
External automation
- [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.
Nightly build
- [x] I have verified that the issue is reproducible with the latest nightly build
Version
0.306.3
...which makes the integration useless?
I will look into it later to see if there is an alternative. Last time they removed a field it came back 2-3 hrs later...
It looks like the API is completely broken. In HA there is no data at all after a reload of the integration.
` Dieser Fehler stammt von einer benutzerdefinierten Integration
Logger: backoff Quelle: custom_components/polestar_api/coordinator.py:89 Integration: Polestar API (Dokumentation, Probleme) Erstmals aufgetreten: 03:33:27 (1 Vorkommnis) Zuletzt protokolliert: 03:33:27
Giving up _execute_once(...) after 3 tries (gql.transport.exceptions.TransportConnectionFailed) `
It looks like the API is completely broken. In HA there is no data at all after a reload of the integration.
` Dieser Fehler stammt von einer benutzerdefinierten Integration
Logger: backoff Quelle: custom_components/polestar_api/coordinator.py:89 Integration: Polestar API (Dokumentation, Probleme) Erstmals aufgetreten: 03:33:27 (1 Vorkommnis) Zuletzt protokolliert: 03:33:27
Giving up _execute_once(...) after 3 tries (gql.transport.exceptions.TransportConnectionFailed) `
No, as mentioned above: one field has been removed. I can make it work with a little trick (use the EstimatedChargingTimeToFullMinutes to see if it is charging) but I guess this is nothing we want in prod.
We could make it work again like this https://github.com/evcc-io/evcc/pull/30074
However, I am wondering if this is feasible @andig
I wouldn‘t know :/
I wouldn‘t know :/
It works technically, the question is rather if you are ok to merge such a work around.
Sure! Would be even better if we had a captured timestamp as base for the addition?
Not really sure what you mean by captured timestamp tbh.
Remaining duration is relative. But relative to what? To be meaningful this needs a timestamp as your api call may be x amount of time in the past.
The logic is: if the remaining charging duration is greater than 0, the car is actually charging. If charging is complete, the remaining time is 0. If it is not charging at all, the remaining time is NULL.
While the remaining duration is relative, it does not really matter to identify whether the car is charging or not.
Of course it does! If you check the api every 15m and remaining is 5m thats quite a difference.
It seems this has already been resolved on the Polestar Forum:
https://polestar.fans/t/polestar-api-zu-mqtt-im-container-openwb-v1-anbindung-moeglich/18589/298
Can the approach taken there be applied here as well?
It seems this has already been resolved on the Polestar Forum:
https://polestar.fans/t/polestar-api-zu-mqtt-im-container-openwb-v1-anbindung-moeglich/18589/298
Can the approach taken there be applied here as well?
Just removing the field charging status as they did? Not a solution.
Of course it does! If you check the api every 15m and remaining is 5m thats quite a difference.
Is that actually a problem?
Let's take your example: System would show charging for 10mins while it already finished charging. After 10 mins it will change to the correct status.
It's not good but better than it is right now. I do not see an alternative right now with the recent changes. From past experience it might change again soon...
Fine with me!
We can enter or retrieve the total battery size in kwh already, and if we can fill in the start %, shouldn't we be able to display a battery percentage based on the charged kwh? Seems that's a very safe fallback for when the battery is not reported for all cars.
E.G 72 kWh battery, we start from 10% and we charge 15 kWh, the display can be 31 % Of course if a reported battery percentage of the car is available that should be used
We can enter or retrieve the total battery size in kwh already, and if we can fill in the start %, shouldn't we be able to display a battery percentage based on the charged kwh? Seems that's a very safe fallback for when the battery is not reported for all cars.
E.G 72 kWh battery, we start from 10% and we charge 15 kWh, the display can be 31 % Of course if a reported battery percentage of the car is available that should be used
How does that help to determine the status wether the car is currently charging or not?
We can enter or retrieve the total battery size in kwh already, and if we can fill in the start %, shouldn't we be able to display a battery percentage based on the charged kwh? Seems that's a very safe fallback for when the battery is not reported for all cars. E.G 72 kWh battery, we start from 10% and we charge 15 kWh, the display can be 31 % Of course if a reported battery percentage of the car is available that should be used
How does that help to determine the status wether the car is currently charging or not?
That still works tho, if there is energy going into the car, the car is charging. It's currently only the battery % that is not being displayed
No, that’s not the problem. The SoC is not displayed because the API call has an error because the chargingStatus field has been removed from the API. We still get the current SoC, this is not a problem.