From 372370786a9ffada5e6ca3e86ad9d60aa4c08bb9 Mon Sep 17 00:00:00 2001 From: Linus Dietz <45101649+Dielee@users.noreply.github.com> Date: Tue, 20 Jun 2023 12:58:08 +0200 Subject: [PATCH] Add debug option --- src/const.py | 2 +- src/volvo.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/const.py b/src/const.py index 482c685..db9f183 100644 --- a/src/const.py +++ b/src/const.py @@ -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" diff --git a/src/volvo.py b/src/volvo.py index ee8abb2..7579796 100644 --- a/src/volvo.py +++ b/src/volvo.py @@ -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")