From de15dc938f4f65228bf431f1a283c4c127671be7 Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 18 Oct 2023 18:34:35 +1000 Subject: [PATCH] remove fprefresh as would cause errors --- custom_components/fordpass/autonomicData.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/fordpass/autonomicData.py b/custom_components/fordpass/autonomicData.py index 761698d..c073b4d 100644 --- a/custom_components/fordpass/autonomicData.py +++ b/custom_components/fordpass/autonomicData.py @@ -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 = { @@ -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}") @@ -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 != "":