Skip to content

Commit

Permalink
remove fprefresh as would cause errors
Browse files Browse the repository at this point in the history
  • Loading branch information
itchannel committed Oct 18, 2023
1 parent 60bccca commit de15dc9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/fordpass/autonomicData.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
VERBOSE = True


def get_autonomic_token(ford_access_token, fp_refresh):
def get_autonomic_token(ford_access_token):
"""Get Autonomic API token from FordPass token"""
url = "https://accounts.autonomic.ai/v1/auth/oidc/token"
headers = {
Expand All @@ -54,8 +54,8 @@ def get_autonomic_token(ford_access_token, fp_refresh):

except requests.exceptions.HTTPError as errh:
print(f"HTTP Error: {errh}")
print("Trying refresh token")
get_autonomic_token(fp_refresh)
# print("Trying refresh token")
# get_autonomic_token(fp_refresh)
return None
except requests.exceptions.ConnectionError as errc:
print(f"Error Connecting: {errc}")
Expand Down Expand Up @@ -157,7 +157,7 @@ def redact_json(data, redaction):
if VERBOSE:
print("WARNING: json will contain sensitive information!")
# Exchange Fordpass token for Autonomic Token
autonomic_token = get_autonomic_token(fpToken, fpRefresh)
autonomic_token = get_autonomic_token(fpToken)
vehicle_status = get_vehicle_status(FP_VIN, autonomic_token["access_token"])
current_datetime = datetime.now().strftime("%Y-%m-%d_%H:%M:%S")
if VIC_YEAR != "":
Expand Down

0 comments on commit de15dc9

Please sign in to comment.