Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Another notable change is the microgrid API client being moved to its own [repos

- A PV pool (`PVPool`/`microgrid.pv_pool()`) was added, with `propose_power`, `power_status` and `power` methods similar to Battery and EV pools.

- The microgrid API client now exposes the reactive power for inverters, meters and EV chargers.

## Enhancements

- Warning messages are logged when multiple instances of `*Pool`s are created for the same set of batteries, with the same priority values.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [
# changing the version
# (plugins.mkdocstrings.handlers.python.import)
"frequenz-channels >= 1.0.0-rc1, < 2.0.0",
"frequenz-client-microgrid >= 0.2.0, < 0.3.0",
"frequenz-client-microgrid >= 0.3.0, < 0.4.0",
"google-api-python-client >= 2.71, < 3",
"grpcio >= 1.54.2, < 2",
"grpcio-tools >= 1.54.2, < 2",
Expand Down
26 changes: 25 additions & 1 deletion tests/utils/component_data_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ def __init__( # pylint: disable=too-many-arguments
active_power_exclusion_lower_bound: float = math.nan,
active_power_inclusion_upper_bound: float = math.nan,
active_power_exclusion_upper_bound: float = math.nan,
reactive_power: float = math.nan,
reactive_power_per_phase: tuple[float, float, float] = (
math.nan,
math.nan,
math.nan,
),
frequency: float = 50.0,
_component_state: inverter_pb.ComponentState.ValueType = (
inverter_pb.ComponentState.COMPONENT_STATE_UNSPECIFIED
Expand All @@ -133,6 +139,8 @@ def __init__( # pylint: disable=too-many-arguments
active_power_exclusion_lower_bound=active_power_exclusion_lower_bound,
active_power_inclusion_upper_bound=active_power_inclusion_upper_bound,
active_power_exclusion_upper_bound=active_power_exclusion_upper_bound,
reactive_power=reactive_power,
reactive_power_per_phase=reactive_power_per_phase,
_component_state=_component_state,
frequency=frequency,
_errors=_errors if _errors else [],
Expand All @@ -157,7 +165,7 @@ def copy_with_new_timestamp(self, new_timestamp: datetime) -> InverterDataWrappe
class EvChargerDataWrapper(EVChargerData):
"""Wrapper for the EvChargerData with default arguments."""

def __init__( # pylint: disable=too-many-arguments
def __init__( # pylint: disable=too-many-arguments,too-many-locals
self,
component_id: int,
timestamp: datetime,
Expand All @@ -173,6 +181,12 @@ def __init__( # pylint: disable=too-many-arguments
active_power_exclusion_lower_bound: float = math.nan,
active_power_inclusion_upper_bound: float = math.nan,
active_power_exclusion_upper_bound: float = math.nan,
reactive_power: float = math.nan,
reactive_power_per_phase: tuple[float, float, float] = (
math.nan,
math.nan,
math.nan,
),
frequency: float = 50.0,
cable_state: EVChargerCableState = EVChargerCableState.UNSPECIFIED,
component_state: EVChargerComponentState = EVChargerComponentState.UNSPECIFIED,
Expand All @@ -193,6 +207,8 @@ def __init__( # pylint: disable=too-many-arguments
active_power_exclusion_lower_bound=active_power_exclusion_lower_bound,
active_power_inclusion_upper_bound=active_power_inclusion_upper_bound,
active_power_exclusion_upper_bound=active_power_exclusion_upper_bound,
reactive_power=reactive_power,
reactive_power_per_phase=reactive_power_per_phase,
frequency=frequency,
cable_state=cable_state,
component_state=component_state,
Expand Down Expand Up @@ -227,6 +243,12 @@ def __init__( # pylint: disable=too-many-arguments
math.nan,
math.nan,
),
reactive_power: float = math.nan,
reactive_power_per_phase: tuple[float, float, float] = (
math.nan,
math.nan,
math.nan,
),
current_per_phase: tuple[float, float, float] = (math.nan, math.nan, math.nan),
voltage_per_phase: tuple[float, float, float] = (math.nan, math.nan, math.nan),
frequency: float = math.nan,
Expand All @@ -241,6 +263,8 @@ def __init__( # pylint: disable=too-many-arguments
timestamp=timestamp,
active_power=active_power,
active_power_per_phase=active_power_per_phase,
reactive_power=reactive_power,
reactive_power_per_phase=reactive_power_per_phase,
current_per_phase=current_per_phase,
voltage_per_phase=voltage_per_phase,
frequency=frequency,
Expand Down