From cb10fe07c305a014164de3492dcbe1f806fb9af7 Mon Sep 17 00:00:00 2001 From: Linus Dietz <45101649+Dielee@users.noreply.github.com> Date: Tue, 21 Nov 2023 09:46:16 +0100 Subject: [PATCH] Move vehicles details endpoint to v2 --- src/const.py | 2 +- src/mqtt.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/const.py b/src/const.py index 1009076..af35d3b 100644 --- a/src/const.py +++ b/src/const.py @@ -4,7 +4,7 @@ VERSION = "v1.8.16" OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2" VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles" -VEHICLE_DETAILS_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles/{0}" +VEHICLE_DETAILS_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}" WINDOWS_STATE_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/windows" CLIMATE_START_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/commands/climatization-start" CLIMATE_STOP_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/commands/climatization-stop" diff --git a/src/mqtt.py b/src/mqtt.py index 49cd7f8..6179b45 100644 --- a/src/mqtt.py +++ b/src/mqtt.py @@ -70,14 +70,14 @@ def send_car_images(vin, data, device): if entity["id"] == "exterior_image": mqtt_client.publish( url_topic, - data["images"]["exteriorDefaultUrl"], + data["images"]["exteriorImageUrl"], retain=True ) if entity["id"] == "interior_image": mqtt_client.publish( url_topic, - data["images"]["interiorDefaultUrl"], + data["images"]["internalImageUrl"], retain=True )