Skip to content

Commit f34d675

Browse files
LKuemmelndrsnhs
authored andcommitted
fix se (openWB#3217)
1 parent c9439ab commit f34d675

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/modules/common/evse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ def deactivate_precise_current(self) -> None:
111111

112112
def set_current(self, current: int, phases_in_use: Optional[int] = None) -> None:
113113
time.sleep(0.1)
114-
formatted_current = round(current*100) if self._precise_current else round(current)
115114
if self.max_current == 20 and phases_in_use is not None and phases_in_use != 0:
116115
# Bei 20A EVSE und bekannter Phasenzahl auf 16A begrenzen, sonst erstmal Ladung mit Minimalstrom starten,
117116
# um Phasenzahl zu ermitteln
118-
if formatted_current > 16 and phases_in_use > 1:
119-
formatted_current = 16
117+
if current > 16 and phases_in_use > 1:
118+
current = 16
119+
formatted_current = round(current*100) if self._precise_current else round(current)
120120
if self.evse_current != formatted_current:
121121
self.client.write_registers(1000, formatted_current, unit=self.id)

0 commit comments

Comments
 (0)