File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,8 @@ def __init__(self, config: VolkswagenIDCarConfig):
192192 super ().__init__ (config )
193193 self ._client = None
194194 self ._vin = config .vin
195+ # additional jobs: charging, climatisation
196+ self ._carStatusUrl = f"{ VolkswagenIDCar .mobile_api_uri } /vehicles/{ self ._vin } /selectivestatus?jobs=fuelStatus,measurements"
195197
196198 @classmethod
197199 def _login (cls , user : str , password : str ) -> OAuth2Session :
@@ -312,11 +314,11 @@ def _read_data(self) -> CarData:
312314
313315 # TODO: get vin if not configured
314316 if self ._client is not None :
315- status_res = self ._client .get (f" { VolkswagenIDCar . mobile_api_uri } /vehicles/ { self ._vin } /selectivestatus?jobs=all" )
317+ status_res = self ._client .get (self ._carStatusUrl )
316318 if status_res .status_code == 401 :
317319 # auth error -> refresh token
318320 VolkswagenIDCar ._refresh_token (self ._client )
319- status_res = self ._client .get (f" { VolkswagenIDCar . mobile_api_uri } /vehicles/ { self ._vin } /selectivestatus?jobs=all" )
321+ status_res = self ._client .get (self ._carStatusUrl )
320322 status_res .raise_for_status ()
321323 status = status_res .json ()
322324 # print(f"{status}")
You can’t perform that action at this time.
0 commit comments