Set otp state right after HA input

This commit is contained in:
Dielee
2024-05-28 08:38:15 +02:00
parent 0dd5852d81
commit 44509529ff
2 changed files with 1 additions and 1 deletions
+1
View File
@@ -133,6 +133,7 @@ def on_message(client, userdata, msg):
if msg.topic == otp_mqtt_topic:
global otp_code
otp_code = payload
set_otp_state()
return None
else:
try:
-1
View File
@@ -156,7 +156,6 @@ def send_otp(auth_session, data):
if not mqtt.otp_code:
raise Exception ("No OTP found, exting...")
mqtt.set_otp_state()
auth = auth_session.post(next_url, data=json.dumps(body))
if auth.status_code == 200:
return auth.json()