Skip to content

Commit fca8106

Browse files
committed
Rename BatteryPoolReferenceStore.batteries_id parameter to component_ids
Signed-off-by: Simon Völcker <simon.voelcker@frequenz.com>
1 parent 54180de commit fca8106

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/frequenz/sdk/microgrid/_data_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def new_battery_pool(
437437
self._battery_power_wrapper.distribution_results_fetcher()
438438
),
439439
min_update_interval=self._resampler_config.resampling_period,
440-
batteries_id=component_ids,
440+
component_ids=component_ids,
441441
)
442442
)
443443

src/frequenz/sdk/timeseries/battery_pool/_battery_pool_reference_store.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__( # pylint: disable=too-many-arguments
4747
power_manager_bounds_subscription_sender: Sender[ReportRequest],
4848
power_distribution_results_fetcher: ReceiverFetcher[Result],
4949
min_update_interval: timedelta,
50-
batteries_id: Set[ComponentId] | None = None,
50+
component_ids: Set[ComponentId] | None = None,
5151
) -> None:
5252
"""Create the class instance.
5353
@@ -77,9 +77,9 @@ def __init__( # pylint: disable=too-many-arguments
7777
the timestamp of the last received component data.
7878
It is currently impossible to use resampling actor for these metrics,
7979
because we can't specify resampling function for them.
80-
batteries_id: Subset of the batteries that should be included in the
81-
battery pool. If None or empty, then all batteries from the microgrid
82-
will be used.
80+
component_ids: An optional list of component_ids belonging to this pool. If
81+
not specified, IDs of all components of the components type of this pool
82+
in the microgrid will be fetched from the component graph.
8383
"""
8484
super().__init__(
8585
channel_registry=channel_registry,
@@ -88,7 +88,7 @@ def __init__( # pylint: disable=too-many-arguments
8888
power_manager_requests_sender=power_manager_requests_sender,
8989
power_manager_bounds_subs_sender=power_manager_bounds_subscription_sender,
9090
power_distribution_results_fetcher=power_distribution_results_fetcher,
91-
component_ids=batteries_id,
91+
component_ids=component_ids,
9292
)
9393

9494
self._batteries = self.component_ids

tests/timeseries/_battery_pool/test_battery_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ async def test_power_status_same_instance_subscriptions_work(
12481248
power_manager_bounds_subscription_sender=requests_channel.new_sender(),
12491249
power_distribution_results_fetcher=MagicMock(),
12501250
min_update_interval=timedelta(seconds=1),
1251-
batteries_id=component_ids,
1251+
component_ids=component_ids,
12521252
),
12531253
name="battery-pool",
12541254
priority=5,

0 commit comments

Comments
 (0)