File tree Expand file tree Collapse file tree
tesla_fleet_api/teslemetry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -559,6 +559,13 @@ an unrecognized response shape raises
559559never mistaken for "no authorized clients". The raw response is still
560560available on ` raw ` for anything not modeled.
561561
562+ ` find_authorized_clients(raw=True) ` skips the typed parse and returns the
563+ exact response ` list_authorized_clients() ` would, matching the call shape of
564+ a local gateway path that also wants to opt out of typing. The parsing itself
565+ lives in the module-level ` tesla_fleet_api.teslemetry.energysite.parse_authorized_clients `
566+ function, which other callers (e.g. a local/LAN client using the same
567+ envelope shape) can reuse directly to get the same ` AuthorizedClients ` result.
568+
562569` remove_authorized_client(public_key) ` accepts raw DER bytes or an already
563570base64-encoded key string. Removal requires no physical presence proof, so any
564571paired key can revoke every other key, including the owner's.
Original file line number Diff line number Diff line change 55import re
66import socket
77import struct
8+ import warnings
89from collections .abc import Awaitable , Callable
910from dataclasses import dataclass
1011from typing import Any , Literal , overload , cast
@@ -207,8 +208,16 @@ def parse_authorized_clients(payload: Any) -> AuthorizedClients:
207208 return AuthorizedClients (clients = clients , raw = payload )
208209
209210
210- # Deprecated alias, kept for one release.
211- _parse_authorized_clients = parse_authorized_clients
211+ def _parse_authorized_clients ( # pyright: ignore[reportUnusedFunction]
212+ payload : Any ,
213+ ) -> AuthorizedClients :
214+ """Deprecated alias for :func:`parse_authorized_clients`, kept for one release."""
215+ warnings .warn (
216+ "_parse_authorized_clients is deprecated; use parse_authorized_clients instead." ,
217+ DeprecationWarning ,
218+ stacklevel = 2 ,
219+ )
220+ return parse_authorized_clients (payload )
212221
213222
214223_GATEWAY_INTERFACES = ("eth" , "wifi" )
You can’t perform that action at this time.
0 commit comments