G-Two / subarulink

A python package for interacting with Subaru STARLINK remote vehicle services.
Apache License 2.0
84 stars 14 forks source link

Controller needs to maintain current VIN state. #3

Closed G-Two closed 4 years ago

G-Two commented 4 years ago

For multi-vehicle accounts, the Controller needs to know/update what the current VIN is since all Subaru API calls are made without reference to a VIN. VIN is set by selectVehicle.json. Current vehicle is returned by login.json as currentVehicleIndex. This only needs to be called if the Controller is making an API call to a VIN that is not the current VIN. It may happen frequently with HomeAssistant users controlling multiple vehicles, so this must be fixed prior to the next release (which currently works because it naively calls selectVehicle.json every time).