Skip to content

Examples in docs/bluetooth_vehicles.md don't run #21

@PedroKTFC

Description

@PedroKTFC

I've been trying to run the examples in docs/bluetooth_vehicles.md and am finding most don't work as documented. For example, to get the Create VehicleBluetooth Instance example to work, I had to update it to:

import asyncio
from tesla_fleet_api import TeslaBluetooth, TeslaFleetApi
from pprint import pprint

async def main():
    tesla_bluetooth = TeslaBluetooth()
    device = await tesla_bluetooth.Vehicles.Bluetooth.find_vehicle(tesla_bluetooth)
    private_key = await tesla_bluetooth.get_private_key()
    vehicle = tesla_bluetooth.vehicles.create("<VIn>")
    await vehicle.pair()
    print(f"Paired with VehicleBluetooth instance for VIN: {vehicle.vin}")

asyncio.run(main())

I'm now trying to get the Pair Vehicle example working for which I'm hitting a brick wall!

It would be very useful if these examples were updated (or clues given as to why they're not working)!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions