Skip to content

Commit faa0c40

Browse files
committed
Remove component power and current methods in EVChargerPool
... because there are no use cases for these, now that we have the `component_data` method. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 24324fe commit faa0c40

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

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

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -120,53 +120,6 @@ async def total_power(self) -> FormulaReceiver:
120120
FormulaGeneratorConfig(component_ids=self._component_ids),
121121
)
122122

123-
async def current(self, component_id: int) -> FormulaReceiver3Phase:
124-
"""Fetch the 3-phase current for the given EV Charger id.
125-
126-
Args:
127-
component_id: id of the EV Charger to stream current values for.
128-
129-
Returns:
130-
A *new* receiver that will stream 3-phase current values for the given
131-
EV Charger.
132-
133-
Raises:
134-
EVChargerPoolError: if the given component_id is not part of the pool.
135-
"""
136-
if component_id not in self._component_ids:
137-
raise EVChargerPoolError(
138-
f"{component_id=} is not part of the EVChargerPool"
139-
f" (with ids={self._component_ids})"
140-
)
141-
return await self._formula_pool.from_generator(
142-
f"ev_charger_current_{component_id}",
143-
EVChargerCurrentFormula,
144-
FormulaGeneratorConfig(component_ids={component_id}),
145-
)
146-
147-
async def power(self, component_id: int) -> FormulaReceiver:
148-
"""Fetch the power for the given EV Charger id.
149-
150-
Args:
151-
component_id: id of the EV Charger to stream power values for.
152-
153-
Returns:
154-
A *new* receiver that will stream power values for the given EV Charger.
155-
156-
Raises:
157-
EVChargerPoolError: if the given component_id is not part of the pool.
158-
"""
159-
if component_id not in self._component_ids:
160-
raise EVChargerPoolError(
161-
f"{component_id=} is not part of the EVChargerPool"
162-
f" (with ids={self._component_ids})"
163-
)
164-
return await self._formula_pool.from_generator(
165-
f"ev_charger_current_{component_id}",
166-
EVChargerPowerFormula,
167-
FormulaGeneratorConfig(component_ids={component_id}),
168-
)
169-
170123
async def component_data(self, component_id: int) -> Receiver[EVChargerData]:
171124
"""Stream 3-phase current values and state of an EV Charger.
172125

0 commit comments

Comments
 (0)