From fbaee39cc792558a5594b3cf66a6af63634770d6 Mon Sep 17 00:00:00 2001 From: Juan Carlos Heredia <45735191+jheredianet@users.noreply.github.com> Date: Sat, 21 Oct 2023 08:42:35 +0200 Subject: [PATCH] Fixed speed on not driving state (#43) + Fixed an issue to speed in some states --- teslamate_mqtt2abrp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teslamate_mqtt2abrp.py b/teslamate_mqtt2abrp.py index 39caaec..9085a01 100644 --- a/teslamate_mqtt2abrp.py +++ b/teslamate_mqtt2abrp.py @@ -315,6 +315,8 @@ def updateABRP(): if(state == "parked" or state == "online" or state == "suspended" or state=="asleep" or state=="offline"): #if parked, update every 30 cylces/seconds if data["power"] != 0: #sometimes after charging the last power value is kept and not refreshed until the next drive or charge session. data["power"] = 0.0 + if data["speed"] > 0: #sometimes after driving the last speed value is kept and not refreshed until the next drive or charge session. + data["speed"] = 0 if "kwh_charged" in data: del data["kwh_charged"] if(i%30==0 or i>30):