Skip to content

Commit

Permalink
Add baseURL to CarApiVehicle class
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieB2B committed Jan 19, 2024
1 parent de506f2 commit fc00db2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/TWCManager/Vehicle/TeslaAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class TeslaAPI:
__apiState = None
__authURL = "https://auth.tesla.com/oauth2/v3/token"
__callbackURL = "https://auth.tesla.com/void/callback"
baseURL = "https://owner-api.teslamotors.com/api/1/vehicles"
proxyCert = None
carApiLastErrorTime = 0
carApiBearerToken = ""
carApiRefreshToken = ""
Expand Down Expand Up @@ -1212,6 +1214,8 @@ class CarApiVehicle:
carapi = None
__config = None
debuglevel = 0
baseURL = "https://owner-api.teslamotors.com/api/1/vehicles"
proxyCert = None
ID = None
name = ""
syncSource = "TeslaAPI"
Expand Down Expand Up @@ -1245,6 +1249,8 @@ class CarApiVehicle:
def __init__(self, json, carapi, config):
self.carapi = carapi
self.__config = config
self.baseURL = config["config"].get("teslaApiUrl", "https://owner-api.teslamotors.com/api/1/vehicles")
self.proxyCert = config["config"].get("httpProxyCert", None)
self.ID = json["id"]
self.VIN = json["vin"]
self.name = json["display_name"]
Expand Down

0 comments on commit fc00db2

Please sign in to comment.