From fbb98481f4e3dce1f97e9eea08e7289531af8b20 Mon Sep 17 00:00:00 2001 From: Linus Dietz <45101649+Dielee@users.noreply.github.com> Date: Tue, 20 Jun 2023 07:52:08 +0200 Subject: [PATCH] Undo changes // Bump version --- const.py | 2 +- mqtt.py | 2 +- volvo.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/const.py b/const.py index c8baafc..80a7875 100644 --- a/const.py +++ b/const.py @@ -1,4 +1,4 @@ -VERSION = "v1.0.3" +VERSION = "v1.0.4" OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2" VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles" diff --git a/mqtt.py b/mqtt.py index 81d04a1..6551379 100644 --- a/mqtt.py +++ b/mqtt.py @@ -6,7 +6,7 @@ import threading from datetime import datetime from babel.dates import format_datetime from config import settings -from const import VEHICLE_DETAILS_URL,CLIMATE_START_URL, CLIMATE_STOP_URL, CAR_LOCK_URL, \ +from const import VEHICLE_DETAILS_URL, CLIMATE_START_URL, CLIMATE_STOP_URL, CAR_LOCK_URL, \ CAR_UNLOCK_URL, supported_sensors, supported_buttons, supported_switches, supported_locks diff --git a/volvo.py b/volvo.py index 52424ca..145781b 100644 --- a/volvo.py +++ b/volvo.py @@ -8,7 +8,7 @@ from const import charging_system_states, CLIMATE_START_URL, \ session = requests.Session() session.headers = { - "vcc-api-key": "", + "vcc-api-key": settings["volvoData"]["vccapikey"], "content-type": "application/json", "accept": "*/*" } @@ -42,7 +42,6 @@ def authorize(): token_expires_at = datetime.now() + timedelta(seconds=(data["expires_in"] - 30)) refresh_token = data["refresh_token"] - session.headers.update({"vcc-api-key": settings["volvoData"]["vccapikey"]}) get_vehicles() else: message = auth.json()