File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments