Skip to content

Commit e5dab36

Browse files
committed
Rename EVChargerPool's total_{current,power} methods to current,power
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent faa0c40 commit e5dab36

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/frequenz/sdk/timeseries/ev_charger_pool/_ev_charger_pool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(
8787
self._resampler_subscription_sender,
8888
)
8989

90-
async def total_current(self) -> FormulaReceiver3Phase:
90+
async def current(self) -> FormulaReceiver3Phase:
9191
"""Fetch the total current for the EV Chargers in the pool.
9292
9393
If a formula engine to calculate EV Charger current is not already running, it
@@ -103,7 +103,7 @@ async def total_current(self) -> FormulaReceiver3Phase:
103103
FormulaGeneratorConfig(component_ids=self._component_ids),
104104
)
105105

106-
async def total_power(self) -> FormulaReceiver:
106+
async def power(self) -> FormulaReceiver:
107107
"""Fetch the total power for the EV Chargers in the pool.
108108
109109
If a formula engine to calculate EV Charger power is not already running, it

tests/timeseries/_formula_engine/test_formula_composition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async def test_3_phase_formulas(self, mocker: MockerFixture) -> None:
126126
ev_pool = microgrid.ev_charger_pool()
127127

128128
grid_current_recv = await logical_meter.grid_current()
129-
ev_current_recv = await ev_pool.total_current()
129+
ev_current_recv = await ev_pool.current()
130130

131131
engine = (grid_current_recv.clone() - ev_current_recv.clone()).build(
132132
"net_current"

tests/timeseries/test_ev_charger_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async def test_ev_power( # pylint: disable=too-many-locals
9797
ComponentMetricId.ACTIVE_POWER,
9898
)
9999
grid_power_recv = await logical_meter.grid_power()
100-
ev_power_recv = await ev_pool.total_power()
100+
ev_power_recv = await ev_pool.power()
101101

102102
await synchronize_receivers([grid_power_recv, main_meter_recv, ev_power_recv])
103103

0 commit comments

Comments
 (0)