Skip to content

Commit f3f2ef5

Browse files
committed
Rename _BatteryStatusChannelHelper_ComponentStatusChannelHelper
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 037a45a commit f3f2ef5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ def get_working_components(self, components: abc.Set[int]) -> set[int]:
4343

4444

4545
@dataclass
46-
class _BatteryStatusChannelHelper:
47-
"""Helper class to create battery status channel.
46+
class _ComponentStatusChannelHelper:
47+
"""Helper class to create component status channel.
4848
4949
Channel has only one receiver.
5050
Receiver has size 1, because we need only latest status.
5151
"""
5252

53-
battery_id: int
54-
"""Id of the battery for which we should create channel."""
53+
component_id: int
54+
"""Id of the component for which we should create channel."""
5555

5656
def __post_init__(self) -> None:
57-
self.name: str = f"battery-{self.battery_id}-status"
57+
self.name: str = f"component-{self.component_id}-status"
5858
channel = Broadcast[Status](self.name)
5959

6060
receiver_name = f"{self.name}-receiver"
@@ -106,7 +106,7 @@ def __init__( # noqa: DOC502 (RuntimeError is raised indirectly by BatteryStatu
106106
receivers: dict[str, Receiver[Status]] = {}
107107

108108
for battery_id in battery_ids:
109-
channel = _BatteryStatusChannelHelper(battery_id)
109+
channel = _ComponentStatusChannelHelper(battery_id)
110110
receivers[channel.name] = channel.receiver
111111

112112
self._batteries[channel.name] = BatteryStatusTracker(

0 commit comments

Comments
 (0)