Skip to content

Commit 693af77

Browse files
committed
Expose component_ids of the EVChargerPool as a property
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 012a0dc commit 693af77

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import logging
1010
import uuid
1111
from asyncio import Task
12+
from collections import abc
1213
from dataclasses import dataclass
1314

1415
from frequenz.channels import Broadcast, ChannelClosedError, Receiver, Sender
@@ -87,6 +88,15 @@ def __init__(
8788
self._resampler_subscription_sender,
8889
)
8990

91+
@property
92+
def component_ids(self) -> abc.Set[int]:
93+
"""Return component IDs of all EV Chargers managed by this EVChargerPool.
94+
95+
Returns:
96+
Set of managed component IDs.
97+
"""
98+
return self._component_ids
99+
90100
async def current(self) -> FormulaReceiver3Phase:
91101
"""Fetch the total current for the EV Chargers in the pool.
92102

0 commit comments

Comments
 (0)