mirror of
https://github.com/Dielee/volvo2mqtt.git
synced 2026-08-10 17:59:53 +02:00
Add debug option
This commit is contained in:
+1
-1
@@ -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"
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user