Skip to content

Commit

Permalink
Move v2 endpoint to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
itchannel committed Sep 16, 2023
1 parent b3f9326 commit c08835a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions custom_components/fordpass/fordpass_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,31 +394,31 @@ def start(self):
Issue a start command to the engine
"""
return self.__request_and_poll(
"PUT", f"{BASE_URL}/vehicles/v2/{self.vin}/engine/start"
"PUT", f"{BASE_URL}/vehicles/v5/{self.vin}/engine/start"
)

def stop(self):
"""
Issue a stop command to the engine
"""
return self.__request_and_poll(
"DELETE", f"{BASE_URL}/vehicles/v2/{self.vin}/engine/start"
"DELETE", f"{BASE_URL}/vehicles/v5/{self.vin}/engine/start"
)

def lock(self):
"""
Issue a lock command to the doors
"""
return self.__request_and_poll(
"PUT", f"{BASE_URL}/vehicles/v2/{self.vin}/doors/lock"
"PUT", f"{BASE_URL}/vehicles/v5/{self.vin}/doors/lock"
)

def unlock(self):
"""
Issue an unlock command to the doors
"""
return self.__request_and_poll(
"DELETE", f"{BASE_URL}/vehicles/v2/{self.vin}/doors/lock"
"DELETE", f"{BASE_URL}/vehicles/v5/{self.vin}/doors/lock"
)

def enable_guard(self):
Expand Down Expand Up @@ -452,7 +452,7 @@ def request_update(self, vin=""):
else:
vinnum = self.vin
status = self.__make_request(
"PUT", f"{BASE_URL}/vehicles/v2/{vinnum}/status", None, None
"PUT", f"{BASE_URL}/vehicles/v5/{vinnum}/status", None, None
)
return status.json()["status"]

Expand Down
2 changes: 1 addition & 1 deletion custom_components/fordpass/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"loggers": ["custom_components.fordpass"],
"requirements": [],
"ssdp": [],
"version": "0.1.51",
"version": "0.1.52",
"zeroconf": []
}
2 changes: 2 additions & 0 deletions info.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## **Changelog**
### Version 1.52
- Update for discontinued API endpoints (Update, lock, remote start)
### Version 1.51
- Fix for incorrect tire pressure conversion
- Handling of blank nickName when configuring car in config flow
Expand Down

0 comments on commit c08835a

Please sign in to comment.