File tree Expand file tree Collapse file tree 1 file changed +29
-2
lines changed
src/frequenz/sdk/microgrid Expand file tree Collapse file tree 1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -300,15 +300,42 @@ def ev_charger_pool(ev_charger_ids: set[int] | None = None) -> EVChargerPool:
300300 created and returned.
301301
302302 Args:
303- ev_charger_ids: Optional set of IDs of EV Charger to be managed by the
304- EVChargerPool.
303+ ev_charger_ids: Optional set of IDs of EV Chargers to be managed by the
304+ EVChargerPool. If not specified, all EV Chargers available in the
305+ component graph are used.
305306
306307 Returns:
307308 An EVChargerPool instance.
308309 """
309310 return _get ().ev_charger_pool (ev_charger_ids )
310311
311312
313+ def battery_pool (battery_ids : abc .Set [int ] | None = None ) -> BatteryPool :
314+ """Return the corresponding BatteryPool instance for the given ids.
315+
316+ If a BatteryPool instance for the given ids doesn't exist, a new one is
317+ created and returned.
318+
319+ Args:
320+ battery_ids: Optional set of IDs of batteries to be managed by the
321+ BatteryPool. If not specified, all batteries available in the
322+ component graph are used.
323+
324+ Returns:
325+ A BatteryPool instance.
326+ """
327+ return _get ().battery_pool (battery_ids )
328+
329+
330+ def power_distributing_handle () -> Bidirectional .Handle [Request , Result ]:
331+ """Return the handle to the power distributing actor.
332+
333+ Returns:
334+ A Bidirectional handle to communicate with the power distributing actor.
335+ """
336+ return _get ().power_distributing_handle ()
337+
338+
312339def _get () -> _DataPipeline :
313340 if _DATA_PIPELINE is None :
314341 raise RuntimeError (
You can’t perform that action at this time.
0 commit comments