Skip to content

Commit

Permalink
Fix AJAR state for windows
Browse files Browse the repository at this point in the history
Dielee committed Nov 11, 2023
1 parent f1953e1 commit 81b2771
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.8.12
### 🐛 Bug Fixes:

- Fix `AJAR` state for windows
- Fix deprecation from `currentThread` to `current_thread`

## v1.8.11
### 🐛 Bug Fixes:

@@ -64,7 +70,7 @@
### 🚀 Features:

- <b>Breaking change: The `vccapikey` setting is now a list. It is possible to
add multiple VCCAPIKEYs. This will be helpful if you are extending your 10.000 call limit some times.
add multiple VCCAPIKEYs. This will be helpful if you are extending your 10.000 call limit sometimes.
Change your vccapikey config like this:

Old:
2 changes: 1 addition & 1 deletion src/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Volvo2Mqtt"
description: "Volvo AAOS MQTT bridge"
version: "1.8.11"
version: "1.8.12"
slug: "volvo2mqtt"
init: false
url: "https://github.com/Dielee/volvo2mqtt"
4 changes: 2 additions & 2 deletions src/const.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from config import settings

VERSION = "v1.8.11"
VERSION = "v1.8.12"

OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles"
@@ -50,7 +50,7 @@
"CONNECTION_STATUS_CONNECTED_DC": "Connected DC", "CONNECTION_STATUS_CONNECTED_AC": "Connected AC",
"CONNECTION_STATUS_FAULT": "Fault"}

window_states = {"CLOSED": "OFF", "OPEN": "ON"}
window_states = {"CLOSED": "OFF", "OPEN": "ON", "AJAR": "ON"}
door_states = {"CLOSED": "OFF", "OPEN": "ON", "UNSPECIFIED": "UNKNOWN", "AJAR": "ON"}
engine_states = {"RUNNING": "ON", "STOPPED": "OFF", "true": "ON", "false": "OFF"}

4 changes: 2 additions & 2 deletions src/volvo.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import util
import time
import re
from threading import currentThread
from threading import current_thread
from datetime import datetime, timedelta
from config import settings
from babel.dates import format_datetime
@@ -303,7 +303,7 @@ def check_engine_status(vin):
# Exit thread as engine state is unsupported by car
return None

t = currentThread()
t = current_thread()
while getattr(t, "do_run", True):
engine_state = api_call(endpoint_url, "GET", vin, "engine_state", True)
if engine_state == "ON":

0 comments on commit 81b2771

Please sign in to comment.