@@ -87,24 +87,6 @@ enum ElectricalComponentCategory {
8787 ELECTRICAL_COMPONENT_CATEGORY_HVAC = 14 ;
8888}
8989
90- // ElectricalComponentStatus defines the possible statuses for a component.
91- //
92- // !!! note
93- // The status indicates the status set by the user via the user interface.
94- // The status is not yet included in the Component messages and should be
95- // added.
96- //
97- enum ElectricalComponentStatus {
98- // The status is unspecified. This should not be used.
99- ELECTRICAL_COMPONENT_STATUS_UNSPECIFIED = 0 ;
100-
101- // The component is active.
102- ELECTRICAL_COMPONENT_STATUS_ACTIVE = 1 ;
103-
104- // The component is inactive.
105- ELECTRICAL_COMPONENT_STATUS_INACTIVE = 2 ;
106- }
107-
10890// Enum to represent the various states that a component can be in.
10991// This enum is unified across all component categories for consistency.
11092enum ElectricalComponentStateCode {
@@ -182,6 +164,54 @@ enum ElectricalComponentStateCode {
182164 ELECTRICAL_COMPONENT_STATE_CODE_PRECHARGER_CLOSED = 42 ;
183165}
184166
167+ // `ElectricalComponentControlMode` explicitly defines whether an electrical
168+ // component is intended to be active (enabled) or inactive (disabled). This
169+ // intentional setting directly determines component availability to downstream
170+ // agents, applications, and services.
171+ //
172+ // !!! note "Control Mode & Component Availability"
173+ // The Control Mode explicitly represents the user's or automation's
174+ // intention to make the component either ACTIVE or INACTIVE. This directly
175+ // impacts availability:
176+ // - ACTIVE indicates the component is intended to be available and usable
177+ // by downstream agents and services.
178+ // - INACTIVE indicates the component is intended to be unavailable for use
179+ // by downstream agents and services.
180+ //
181+ // !!! note "Relationship with Operational State"
182+ // Control Mode explicitly represents intention, distinct from the
183+ // component's actual internal Operational State.
184+ // Operational State is independently reported by the component hardware
185+ // (e.g., READY, CHARGING, DISCHARGING, ERROR).
186+ //
187+ // !!! caution "Immediate Operational Impact"
188+ // Changing the Control Mode of an electrical component (e.g., via the
189+ // Microgrid API) takes immediate effect on its availability to downstream
190+ // agents and services. Setting a component to `INACTIVE` can thus instantly
191+ // interrupt ongoing operations or cause service disruptions. Setting a
192+ // component to `ACTIVE` may immediately connect it with other components,
193+ // potentially causing electrical damage. Therefore, ensure changes are
194+ // coordinated or planned appropriately to avoid unintended impact and/or
195+ // damages.
196+ //
197+ // !!! example "Control Mode Change Impact"
198+ // If a battery component's Control Mode is switched from `ACTIVE` to
199+ // `INACTIVE`, it immediately becomes unavailable to downstream
200+ // services and agents, potentially disrupting scheduled
201+ // charging/discharging cycles.
202+ enum ElectricalComponentControlMode {
203+ // The control mode is unspecified (should never be explicitly used).
204+ ELECTRICAL_COMPONENT_CONTROL_MODE_UNSPECIFIED = 0 ;
205+
206+ // The component is explicitly enabled and intended to be available for
207+ // downstream usage.
208+ ELECTRICAL_COMPONENT_CONTROL_MODE_ACTIVE = 1 ;
209+
210+ // The component is explicitly disabled and intended to be unavailable for
211+ // downstream usage.
212+ ELECTRICAL_COMPONENT_CONTROL_MODE_INACTIVE = 2 ;
213+ }
214+
185215// A representation of all possible diagnostic codes that can occur for
186216// electrical component, across all their categories. These diagnostic codes
187217// can be used to refer to warnings or errors that are reported by the
@@ -357,8 +387,8 @@ message ElectricalComponent {
357387 // The model name of the component.
358388 string model_name = 7 ;
359389
360- // The status of the component.
361- ElectricalComponentStatus status = 8 ;
390+ // The control mode of the component.
391+ ElectricalComponentControlMode control_mode = 8 ;
362392
363393 // The operational lifetime of the component.
364394 frequenz.api.common.v1.microgrid.Lifetime operational_lifetime = 9 ;
0 commit comments