Skip to content

Commit

Permalink
Fixed speed on not driving state (#43)
Browse files Browse the repository at this point in the history
+ Fixed an issue to speed in some states
  • Loading branch information
jheredianet authored Oct 21, 2023
1 parent 8a05bed commit fbaee39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions teslamate_mqtt2abrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fbaee39

Please sign in to comment.