Skip to content

Commit d902115

Browse files
committed
Check that only charge powers are requested through EVChargerPool
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent c9a6162 commit d902115

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ async def propose_power(
115115
actors with a higher priority. If None, the power bounds will be set to
116116
the maximum power of the batteries in the pool. This is currently and
117117
experimental feature.
118+
119+
Raises:
120+
EVChargerPoolError: If a discharge power for EV chargers is requested.
118121
"""
122+
if power is not None and power < Power.zero():
123+
raise EVChargerPoolError(
124+
"Discharging from EV chargers is currently not supported."
125+
)
119126
await self._ev_charger_pool.power_manager_requests_sender.send(
120127
_power_managing.Proposal(
121128
source_id=self._source_id,

0 commit comments

Comments
 (0)