Skip to content

Commit d4fd2c8

Browse files
committed
Client change to add services
1 parent a9fe317 commit d4fd2c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tesla_fleet_api/tesla/vehicle/bluetooth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import hashlib
44
import asyncio
55
from typing import TYPE_CHECKING
6+
from bleak.backends.service import BleakGATTServiceCollection
67
from google.protobuf.message import DecodeError
78
from bleak_retry_connector import establish_connection, MAX_CONNECT_ATTEMPTS
89
from bleak import BleakClient, BleakScanner
@@ -126,7 +127,8 @@ async def connect(self, max_attempts: int = MAX_CONNECT_ATTEMPTS) -> None:
126127
self.device,
127128
self.vin,
128129
max_attempts=max_attempts,
129-
ble_device_callback=self.get_device
130+
#ble_device_callback=self.get_device,
131+
services=[SERVICE_UUID]
130132
)
131133
await self.client.start_notify(READ_UUID, self._on_notify)
132134

@@ -212,6 +214,7 @@ async def _send(self, msg: RoutableMessage, requires: str, timeout: int = 2) ->
212214
if resp.HasField(requires):
213215
return resp
214216

217+
215218
async def pair(self, role: Role = Role.ROLE_OWNER, form: KeyFormFactor = KeyFormFactor.KEY_FORM_FACTOR_CLOUD_KEY, timeout: int = 60):
216219
"""Pair the key."""
217220

0 commit comments

Comments
 (0)