From 2ba10349e3a114340fb987a4bac4b7c4466b0ec2 Mon Sep 17 00:00:00 2001 From: Julien <6372605+fetzu@users.noreply.github.com> Date: Fri, 20 Oct 2023 20:14:42 +0200 Subject: [PATCH] Revert "Improve calculate acurrate power on AC charging" This reverts commit 4934ae633ce153a9b250b8bbe1c0ab83b08f2316. --- teslamate_mqtt2abrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teslamate_mqtt2abrp.py b/teslamate_mqtt2abrp.py index b7bfcf3..c0d0600 100644 --- a/teslamate_mqtt2abrp.py +++ b/teslamate_mqtt2abrp.py @@ -215,7 +215,7 @@ def on_message(client, userdata, message): #print("Unneeded topic:", message.topic, payload) # Calculate acurrate power on AC charging - if data["is_dcfc"]==False: + if data["power"] != 0.0 and data["is_charging"] == True and "voltage" in data and "current" in data: data["power"] = float(data["current"] * data["voltage"] * charger_phases) / 1000.0 * -1 return