diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 389f74f..c16b545 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.8.18 +### 🐛 Bug Fixes: + +- Fix Backend State Sensor returning `null` + ## v1.8.17 ### 🚀 Features: diff --git a/src/config.yaml b/src/config.yaml index 75cf2a0..4bb8a56 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -1,6 +1,6 @@ name: "Volvo2Mqtt" description: "Volvo AAOS MQTT bridge" -version: "1.8.17" +version: "1.8.18" slug: "volvo2mqtt" init: false url: "https://github.com/Dielee/volvo2mqtt" diff --git a/src/const.py b/src/const.py index e6d5c67..521b131 100644 --- a/src/const.py +++ b/src/const.py @@ -1,6 +1,6 @@ from config import settings -VERSION = "v1.8.17" +VERSION = "v1.8.18" OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2" VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles" diff --git a/src/volvo.py b/src/volvo.py index bb6433c..af947c8 100644 --- a/src/volvo.py +++ b/src/volvo.py @@ -328,9 +328,16 @@ def get_backend_status(): response = session.get(API_BACKEND_STATUS, timeout=15) try: data = response.json() - backend_status = data["message"] if util.keys_exists(data, "message") else "No warnings" + if util.keys_exists(data, "message"): + if data["message"]: + backend_status = data["message"] + else: + backend_status = "NO_WARNING" + else: + backend_status = "NO_WARNING" + except JSONDecodeError as e: - backend_status = "No warnings" + backend_status = "NO_WARNING" return backend_status