Skip to content

Commit 59ff8f4

Browse files
committed
fixup! Pass ComponentType as arguments to PowerManager and PowerDistributor
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent da79d53 commit 59ff8f4

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

src/frequenz/sdk/actor/_power_managing/_power_managing_actor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ def __init__( # pylint: disable=too-many-arguments
4949
component_category: The category of the component this power manager
5050
instance is going to support.
5151
component_type: The type of the component of the given category that this
52-
actor is responsible for.
52+
actor is responsible for. This is used only when the component category
53+
is not enough to uniquely identify the component. For example, when the
54+
category is `ComponentCategory.INVERTER`, the type is needed to identify
55+
the inverter as a solar inverter or a battery inverter. This can be
56+
`None` when the component category is enough to uniquely identify the
57+
component.
5358
proposals_receiver: The receiver for proposals.
5459
bounds_subscription_receiver: The receiver for bounds subscriptions.
5560
power_distributing_requests_sender: The sender for power distribution

src/frequenz/sdk/actor/power_distributing/power_distributing.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ def __init__( # pylint: disable=too-many-arguments
7272
component_category: The category of the components that this actor is
7373
responsible for.
7474
component_type: The type of the component of the given category that this
75-
actor is responsible for.
75+
actor is responsible for. This is used only when the component category
76+
is not enough to uniquely identify the component. For example, when the
77+
category is `ComponentCategory.INVERTER`, the type is needed to identify
78+
the inverter as a solar inverter or a battery inverter. This can be
79+
`None` when the component category is enough to uniquely identify the
80+
component.
7681
requests_receiver: Receiver for receiving power requests from the power
7782
manager.
7883
results_sender: Sender for sending results to the power manager.

src/frequenz/sdk/microgrid/_power_wrapper.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ def __init__(
4848
component_category: The category of the components that actors started by
4949
this instance of the PowerWrapper will be responsible for.
5050
component_type: The type of the component of the given category that this
51-
actor is responsible for.
51+
actor is responsible for. This is used only when the component category
52+
is not enough to uniquely identify the component. For example, when the
53+
category is `ComponentCategory.INVERTER`, the type is needed to identify
54+
the inverter as a solar inverter or a battery inverter. This can be
55+
`None` when the component category is enough to uniquely identify the
56+
component.
5257
channel_registry: A channel registry for use in the actors.
5358
"""
5459
self._component_category = component_category

0 commit comments

Comments
 (0)