Skip to content

Commit

Permalink
fix deviating evse current
Browse files Browse the repository at this point in the history
  • Loading branch information
LKuemmel committed Jan 23, 2025
1 parent ec68a89 commit 93f1762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/control/algorithm/surplus_controlled.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _fix_deviating_evse_current(self, chargepoint: Chargepoint) -> float:
MAX_DEVIATION = 1.1
evse_current = chargepoint.data.get.evse_current
if evse_current and chargepoint.data.set.current != chargepoint.data.set.current_prev:
formatted_evse_current = evse_current if evse_current < 32 else evse_current / 100
formatted_evse_current = evse_current if evse_current <= 32 else evse_current / 100
offset = formatted_evse_current - max(chargepoint.data.get.currents)
if abs(offset) >= MAX_DEVIATION:
current_with_offset = chargepoint.data.set.current + offset
Expand Down

0 comments on commit 93f1762

Please sign in to comment.