Add debug option

This commit is contained in:
Linus Dietz
2023-06-20 12:58:08 +02:00
parent 13ac9a9c2c
commit 372370786a
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION = "v1.0.7"
VERSION = "v1.0.8"
OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles"
+3
View File
@@ -139,6 +139,9 @@ def api_call(url, method, vin, sensor_id=None):
if response.status_code == 200:
data = response.json()
if "debug" in settings:
if settings["debug"]:
print(response.text)
else:
if url == CLIMATE_START_URL and response.status_code == 503:
print("Car in use, cannot start pre climatization")