Logic around charge/discharge calculations was backwards

This commit is contained in:
Paul Warren 2024-10-20 06:34:44 +11:00
parent da26dc0192
commit 065fdeab98

View file

@ -33,7 +33,7 @@ print(" SoC: %.2f" % soc_percent)
print("Total WH: %.2f" % total_wh)
wh_remain = (soc_percent / 100.0) * total_wh
h_estim = wh_remain - (avg_charge - avg_discharge)
h_estim = wh_remain - (avg_discharge - avg_charge)
h_estpct = (h_estim / total_wh) * 100
print("WH remain: %.2f" % wh_remain)