Ocpp: use correct profile current when switching phases (#17003)

This commit is contained in:
andig 2024-10-31 11:13:48 +01:00 • committed by GitHub
parent 98663c2caf
commit 60b68c2d4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)