mirror of
https://github.com/Dielee/volvo2mqtt.git
synced 2026-08-13 19:29:52 +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"
|
OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
|
||||||
VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles"
|
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:
|
if response.status_code == 200:
|
||||||
data = response.json()
|
data = response.json()
|
||||||
|
if "debug" in settings:
|
||||||
|
if settings["debug"]:
|
||||||
|
print(response.text)
|
||||||
else:
|
else:
|
||||||
if url == CLIMATE_START_URL and response.status_code == 503:
|
if url == CLIMATE_START_URL and response.status_code == 503:
|
||||||
print("Car in use, cannot start pre climatization")
|
print("Car in use, cannot start pre climatization")
|
||||||
|
|||||||
Reference in New Issue
Block a user