File tree 1 file changed +12
-7
lines changed
src/frequenz/sdk/timeseries/pv_pool
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,20 @@ def __init__( # pylint: disable=too-many-arguments
97
97
name = f"System Bounds for PV inverters: { component_ids } " ,
98
98
resend_latest = True ,
99
99
)
100
- self .bounds_tracker : PVSystemBoundsTracker = PVSystemBoundsTracker (
101
- self .component_ids ,
102
- self .status_receiver ,
103
- self .bounds_channel .new_sender (),
104
- )
105
- self .bounds_tracker .start ()
100
+
101
+ self .bounds_tracker : PVSystemBoundsTracker | None = None
102
+ # In locations without PV inverters, the bounds tracker will not be started.
103
+ if self .component_ids :
104
+ self .bounds_tracker = PVSystemBoundsTracker (
105
+ self .component_ids ,
106
+ self .status_receiver ,
107
+ self .bounds_channel .new_sender (),
108
+ )
109
+ self .bounds_tracker .start ()
106
110
107
111
async def stop (self ) -> None :
108
112
"""Stop all tasks and channels owned by the PVInverterPool."""
109
113
await self .formula_pool .stop ()
110
- await self .bounds_tracker .stop ()
114
+ if self .bounds_tracker is not None :
115
+ await self .bounds_tracker .stop ()
111
116
self .status_receiver .close ()
You can’t perform that action at this time.
0 commit comments