Here's the bug:
|
# To satisfy the largest exclusion bounds in the set we need to |
|
# provide the power defined by the largest bounds multiplied by the |
|
# number of batteries in the set. |
|
power_exclusion_upper_bound = Power.from_watts( |
|
max(bounds.exclusion_upper for bounds in battery_metrics).as_watts() |
|
* len(battery_metrics) |
|
) |
|
power_exclusion_lower_bound = Power.from_watts( |
|
min(bounds.exclusion_lower for bounds in battery_metrics).as_watts() |
|
* len(battery_metrics) |
|
) |
If one battery has exclusion bounds, it is applying those to all the batteries. So the total exclusion range becomes much bigger. For example, if only one battery had exclusion bounds, the rest of them should be usable normally.