Allow buffersoc = prioritysoc (#12042)

This commit is contained in:
Michael Geers 2024-02-04 12:20:39 +01:00 • committed by GitHub
parent a440cda077
commit bdeac02fad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -183,8 +183,8 @@ func (site *Site) SetBufferSoc(soc float64) error {
return ErrBatteryNotConfigured
}
if soc != 0 && soc <= site.prioritySoc {
return errors.New("buffer soc must be larger than priority soc")
if soc != 0 && soc < site.prioritySoc {
return errors.New("buffer soc must not be smaller than priority soc")
}
if site.bufferStartSoc != 0 && soc > site.bufferStartSoc {