Skip to content

Commit

Permalink
Ocpp: use correct profile current when switching phases (#17003)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Oct 31, 2024
1 parent 98663c2 commit 60b68c2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion charger/ocpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,17 @@ func (c *OCPP) MaxCurrentMillis(current float64) error {
func (c *OCPP) phases1p3p(phases int) error {
c.phases = phases

return c.setCurrent(c.current)
enabled, err := c.Enabled()
if err != nil {
return err
}

var current float64
if enabled {
current = c.current
}

return c.setCurrent(current)
}

var _ api.Identifier = (*OCPP)(nil)
Expand Down

0 comments on commit 60b68c2

Please sign in to comment.