diff --git a/teslamate_mqtt2abrp.py b/teslamate_mqtt2abrp.py index bf210ec..595ee8d 100644 --- a/teslamate_mqtt2abrp.py +++ b/teslamate_mqtt2abrp.py @@ -311,8 +311,8 @@ def updateABRP(): str_now = current_datetime.strftime("%Y-%m-%d %H:%M:%S") msg = str_now + ": Car is " + state 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 it keeps the last Power and not refresh any more until new drive or charge. - # data["power"] = 0 + if data["power"] != 0: #Sometimes after charging it keeps the last Power and not refresh any more until new drive or charge. + data["power"] = 0.0 if "kwh_charged" in data: del data["kwh_charged"] if(i%30==0 or i>30):