DurgNomis-drol / mytoyota

Python client for Toyota Connected Services API
MIT License
77 stars 32 forks source link

how to get information for a single vehicle? #329

Closed noyax closed 3 months ago

noyax commented 8 months ago

Discussed in https://github.com/DurgNomis-drol/mytoyota/discussions/328

Originally posted by **noyax** February 6, 2024 Hello, I have two vehicles associated with my mytoyota account and I would like to have the information only for one vehicle, is this possible and if so how should I do it? thanks in advance
noyax commented 8 months ago

ok I found a solution, in the simple_client_example.py file I added a condition on the VIN number:

for car in cars:
    await car.update()
    if (car.vin) == "xxxxxx":

If you have another solution

CM000n commented 7 months ago

The simple_client_example.py example is, as the name suggests, only an example, and not the mytoyota python lib itself 😉 So you can use it as you like. 😊

Obtaining data for a specific vehicle always requires knowing the VIN of that vehicle. Since we assume that the majority of users do not know the VIN of their vehicle, the query of data for a specific Vin is not integrated as a callable parameter. We therefore automatically determine all vehicles for a user first.