Skip to content

Commit d97ad0b

Browse files
committed
Rename EVChargerPool.currentcurrent_per_phase
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 5a8587c commit d97ad0b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def component_ids(self) -> abc.Set[int]:
147147
return self._pool_ref_store.component_ids
148148

149149
@property
150-
def current(self) -> FormulaEngine3Phase[Current]:
150+
def current_per_phase(self) -> FormulaEngine3Phase[Current]:
151151
"""Fetch the total current for the EV Chargers in the pool.
152152
153153
This formula produces values that are in the Passive Sign Convention (PSC).

src/frequenz/sdk/timeseries/formula_engine/_formula_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ class FormulaEngine3Phase(
478478
grid = microgrid.grid()
479479
480480
# Calculate grid consumption current that's not used by the EV chargers
481-
other_current = (grid.current_per_phase - ev_charger_pool.current).build(
481+
other_current = (grid.current_per_phase - ev_charger_pool.current_per_phase).build(
482482
"other_current"
483483
)
484484

tests/timeseries/_formula_engine/test_formula_composition.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,11 @@ async def test_3_phase_formulas(self, mocker: MockerFixture) -> None:
429429
stack.push_async_callback(grid.stop)
430430

431431
grid_current_recv = grid.current_per_phase.new_receiver()
432-
ev_current_recv = ev_pool.current.new_receiver()
432+
ev_current_recv = ev_pool.current_per_phase.new_receiver()
433433

434-
engine = (grid.current_per_phase - ev_pool.current).build("net_current")
434+
engine = (grid.current_per_phase - ev_pool.current_per_phase).build(
435+
"net_current"
436+
)
435437
stack.push_async_callback(engine._stop) # pylint: disable=protected-access
436438
net_current_recv = engine.new_receiver()
437439

0 commit comments

Comments
 (0)