From c7373e3f885a6eb7bf75488b82403b55217ac4c0 Mon Sep 17 00:00:00 2001 From: Juan Carlos Heredia Date: Sun, 15 Oct 2023 17:14:57 +0200 Subject: [PATCH] Control Power after suspended --- teslamate_mqtt2abrp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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):