mirror of
https://github.com/Dielee/volvo2mqtt.git
synced 2026-08-13 11:19:52 +02:00
Fix missing startupcheck if using token from file
This commit is contained in:
+4
-3
@@ -92,13 +92,14 @@ def authorize(renew_tokenfile=False):
|
|||||||
refresh_token = token_data["refresh_token"]
|
refresh_token = token_data["refresh_token"]
|
||||||
|
|
||||||
util.save_to_json(token_data)
|
util.save_to_json(token_data)
|
||||||
|
else:
|
||||||
|
message = auth.json()
|
||||||
|
raise Exception(message["details"][0]["userMessage"])
|
||||||
|
|
||||||
get_vcc_api_keys()
|
get_vcc_api_keys()
|
||||||
get_vehicles()
|
get_vehicles()
|
||||||
check_supported_endpoints()
|
check_supported_endpoints()
|
||||||
Thread(target=backend_status_loop).start()
|
Thread(target=backend_status_loop).start()
|
||||||
else:
|
|
||||||
message = auth.json()
|
|
||||||
raise Exception(message["details"][0]["userMessage"])
|
|
||||||
|
|
||||||
def continue_auth(auth_session, data):
|
def continue_auth(auth_session, data):
|
||||||
next_url = data["_links"]["continueAuthentication"]["href"] + "?action=continueAuthentication"
|
next_url = data["_links"]["continueAuthentication"]["href"] + "?action=continueAuthentication"
|
||||||
|
|||||||
Reference in New Issue
Block a user