Optimizer: ignore batteries of unknown capacity
This commit is contained in:
parent
a2d95dbe17
commit
3fe4943757
1 changed files with 2 additions and 1 deletions
|
|
@ -211,7 +211,8 @@ func (site *Site) optimizerUpdate(battery []measurement) error {
|
|||
}
|
||||
|
||||
for i, b := range battery {
|
||||
if b.Capacity == nil || b.Soc == nil {
|
||||
// TODO decide if nil should be only indicator
|
||||
if b.Capacity == nil || *b.Capacity == 0 || b.Soc == nil || *b.Soc == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue