Optimizer: fix empty batteries excluded (#24162)

This commit is contained in:
Lars 2025-10-06 15:29:50 +02:00 • committed by GitHub
parent a67c904d4e
commit 2b379ed415
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -219,8 +219,7 @@ func (site *Site) optimizerUpdate(battery []measurement) error {
}
for i, b := range battery {
// TODO decide if nil should be only indicator
if b.Capacity == nil || *b.Capacity == 0 || b.Soc == nil || *b.Soc == 0 {
if b.Capacity == nil || *b.Capacity == 0 || b.Soc == nil {
continue
}