Skip to content

Commit

Permalink
Quality optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Dielee committed Nov 10, 2023
1 parent 459c2dc commit f1953e1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.8.11
### 🐛 Bug Fixes:

- Remove old code from checks for running engine sensor
- Move battery charge level sensor from v2 to v1, as v2 returns 404

## v1.8.10
### 🐛 Bug Fixes:

Expand Down
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.10"
version: "1.8.11"
slug: "volvo2mqtt"
init: false
url: "https://github.com/Dielee/volvo2mqtt"
Expand Down
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.10"
VERSION = "v1.8.11"

OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles"
Expand All @@ -16,7 +16,7 @@
LOCATION_STATE_URL = "https://api.volvocars.com/location/v1/vehicles/{0}/location"
TYRE_STATE_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/tyres"
ENGINE_STATE_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/engine-status"
BATTERY_CHARGE_STATE_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/battery-charge-level"
BATTERY_CHARGE_STATE_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles/{0}/battery-charge-level"
FUEL_STATE_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/fuel"
STATISTICS_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/statistics"
ENGINE_DIAGNOSTICS_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/engine"
Expand Down
5 changes: 0 additions & 5 deletions src/volvo.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,6 @@ def check_supported_endpoints():
# If battery charge level could be found in recharge-api, skip the second battery charge sensor
continue

if entity["id"] == "engine_state" and entity["url"] == ENGINE_DIAGNOSTICS_URL \
and any("engine_state" in d["id"] for d in supported_endpoints[vin]):
# If engine state could be found in engine state endpoint, skip the second engine running sensor
continue

if entity.get('url'):
state = api_call(entity["url"], "GET", vin, entity["id"])
else:
Expand Down

0 comments on commit f1953e1

Please sign in to comment.