forked from peter/volvo2mqtt
Move vehicles details endpoint to v2
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ VERSION = "v1.8.16"
|
|||||||
|
|
||||||
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/v2/vehicles"
|
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"
|
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_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"
|
CLIMATE_STOP_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/commands/climatization-stop"
|
||||||
|
|||||||
+2
-2
@@ -70,14 +70,14 @@ def send_car_images(vin, data, device):
|
|||||||
if entity["id"] == "exterior_image":
|
if entity["id"] == "exterior_image":
|
||||||
mqtt_client.publish(
|
mqtt_client.publish(
|
||||||
url_topic,
|
url_topic,
|
||||||
data["images"]["exteriorDefaultUrl"],
|
data["images"]["exteriorImageUrl"],
|
||||||
retain=True
|
retain=True
|
||||||
)
|
)
|
||||||
|
|
||||||
if entity["id"] == "interior_image":
|
if entity["id"] == "interior_image":
|
||||||
mqtt_client.publish(
|
mqtt_client.publish(
|
||||||
url_topic,
|
url_topic,
|
||||||
data["images"]["interiorDefaultUrl"],
|
data["images"]["internalImageUrl"],
|
||||||
retain=True
|
retain=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user