Skip to content

Commit a4d10b1

Browse files
committed
Added a log entry to indicate when the state of charge calculation exceeds 100%.
1 parent 7f84971 commit a4d10b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/inverter.py

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def calculate_state_of_charge_from_energy_amount(self, energy_amount: EnergyAmou
104104
"""
105105
state_of_charge = int(energy_amount.watt_hours / self.battery_capacity.watt_hours * 100)
106106
if state_of_charge > 100:
107+
self.log.info(f"The calculated state of charge is {state_of_charge}, capping it at 100 %")
107108
return 100
108109
return state_of_charge
109110

0 commit comments

Comments
 (0)