From 75db5da3248a539f4efb0873742785635a46ad08 Mon Sep 17 00:00:00 2001 From: linus Date: Sun, 27 Oct 2024 10:06:47 +0100 Subject: [PATCH] Fix re-auth with OTP while app runtime #251 --- src/CHANGELOG.md | 5 +++++ src/config.yaml | 2 +- src/const.py | 2 +- src/volvo.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 22e869b..fdc39aa 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.10.4 +### 🐛 Bug Fixes: + +- re-fix bug if app needs to be re-authenticated with OTP while runtime + ## v1.10.3 ### 🐛 Bug Fixes: diff --git a/src/config.yaml b/src/config.yaml index b789697..987cb97 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -1,6 +1,6 @@ name: "Volvo2Mqtt" description: "Volvo AAOS MQTT bridge" -version: "1.10.3" +version: "1.10.4" slug: "volvo2mqtt" init: false url: "https://github.com/Dielee/volvo2mqtt" diff --git a/src/const.py b/src/const.py index a32969a..f4988b7 100644 --- a/src/const.py +++ b/src/const.py @@ -1,6 +1,6 @@ from config import settings -VERSION = "v1.10.3" +VERSION = "v1.10.4" OAUTH_TOKEN_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2" OAUTH_AUTH_URL = "https://volvoid.eu.volvocars.com/as/authorization.oauth2" diff --git a/src/volvo.py b/src/volvo.py index 23ebd2c..5c0242b 100644 --- a/src/volvo.py +++ b/src/volvo.py @@ -161,8 +161,8 @@ def send_otp(auth_session, data): raise Exception ("No OTP found, exting...") auth = auth_session.post(next_url, data=json.dumps(body)) + mqtt.otp_code = None if auth.status_code == 200: - mqtt.otp_code = None return auth.json() else: message = auth.json()