Skip to content

Commit

Permalink
Revert "Improve calculate acurrate power on AC charging"
Browse files Browse the repository at this point in the history
This reverts commit 4934ae6.
  • Loading branch information
fetzu committed Oct 20, 2023
1 parent 3a604ca commit 2ba1034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teslamate_mqtt2abrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ba1034

Please sign in to comment.