What’s Changed
Breaking change
* All network-related functions are now **async**, requiring the `await` keyword or similar functionality. If you are using this library in your custom code, it will most likely affect you in one of the following functions:
* `bimmer_connected.account.ConnectedDriveAccount.get_vehicles()`
* `bimmer_connected.remote_services.RemoteServices.trigger_[any-remote-service]()`
* `bimmer_connected.vehicle.ConnectedDriveVehicle.get_vehicle_image()`
* Initialization of `MyBMWAccount` does not automatically get the vehicles from the API, use `get_vehicles()`:
python
account = MyBMWAccount(USERNAME, PASSWORD, REGION)
await account.get_vehicles() if executing in async function
asyncio.run(account.get_vehicles()) if executing in synchronous function
* All `ConnectedDrive...` objects have been deprecated and renamed to `MyBMW...`. You will see a logged `DeprecationWarning` everytime your code accesses a deprecated property.
* `VehicleStatus` is now deprecated. All of the information is available via `MyBMWVehicle` attributes. You will see a logged `DeprecationWarning` everytime your code accesses a deprecated property.
* `bimmer_connected.country_selector` has been removed in favor of `bimmer_connected.api.regions`
* While not offically supported before, Python<3.6 is now broken
Changes
* Refactor library to async (400) rikroe
* Great support for login to china by HuChundong, muxiachuixue, vividmuse
* Add `TARGET_REACHED` `ChargingState` (431) rikroe
* Fully typed library, add mypy to pre-commit and test pipeline (432) rikroe
* Add `convertible_top` attribute (437) rikroe, skrashevich
* Refactor auth flow to `httpx.Auth` and reauthenticate after `HTTP 401` instead of calculated token expiry (436) rikroe