Skip to content

Fix PV inverter manager for 0 W power request #933

@daniel-zullo-frequenz

Description

@daniel-zullo-frequenz

What happened?

The function distribute_power attempts to set a power request of 0W via the API when the list of allocations is empty, leading to an unhandled exception.

Initially, the remaining power is set to 0W based on the request passed as a parameter to the function. Then, when the check for zero remaining power is made, it causes the loop over working components to exit prematurely, resulting in the API power request being executed even though the list of allocations is empty, thus triggering an unhandled exception.

What did you expect instead?

The API power request is set to 0 W for each PV inverter.

Affected version(s)

1.0.0-rc6

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions