component
frequenz.client.microgrid.component ¤
All classes and functions related to microgrid components.
Attributes¤
frequenz.client.microgrid.component.BatteryTypes
module-attribute
¤
BatteryTypes: TypeAlias = (
LiIonBattery
| NaIonBattery
| UnrecognizedBattery
| UnspecifiedBattery
)
All possible battery types.
frequenz.client.microgrid.component.ComponentTypes
module-attribute
¤
ComponentTypes: TypeAlias = (
BatteryTypes
| Chp
| Converter
| CryptoMiner
| Electrolyzer
| EvChargerTypes
| GridConnectionPoint
| Hvac
| InverterTypes
| Meter
| Precharger
| ProblematicComponentTypes
| Relay
| VoltageTransformer
)
All possible component types.
frequenz.client.microgrid.component.EvChargerTypes
module-attribute
¤
EvChargerTypes: TypeAlias = (
UnspecifiedEvCharger
| AcEvCharger
| DcEvCharger
| HybridEvCharger
| UnrecognizedEvCharger
)
All possible EV charger types.
frequenz.client.microgrid.component.ProblematicComponentTypes
module-attribute
¤
ProblematicComponentTypes: TypeAlias = (
MismatchedCategoryComponent
| UnrecognizedComponentTypes
| UnspecifiedComponentTypes
)
All possible component types that has a problem.
frequenz.client.microgrid.component.UnspecifiedComponentTypes
module-attribute
¤
UnspecifiedComponentTypes: TypeAlias = (
UnspecifiedBattery
| UnspecifiedComponent
| UnspecifiedEvCharger
| UnspecifiedInverter
)
All unspecified component types.
Classes¤
frequenz.client.microgrid.component.AcEvCharger
dataclass
¤
Bases: EvCharger
An EV charger that supports AC charging only.
Source code in frequenz/client/microgrid/component/_ev_charger.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[EV_CHARGER] = EV_CHARGER
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete EV charger class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
The type of this EV charger.
Note
This should not be used normally, you should test if a EV charger
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new EV charger type yet (i.e. for use with
UnrecognizedEvCharger).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.Battery
dataclass
¤
Bases: Component
An abstract battery component.
Source code in frequenz/client/microgrid/component/_battery.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
instance-attribute
¤
type: BatteryType | int
The type of this battery.
Note
This should not be used normally, you should test if a battery
isinstance of a concrete battery class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new battery type yet (i.e. for use with
UnrecognizedBattery).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.BatteryInverter
dataclass
¤
Bases: Inverter
A battery inverter.
Source code in frequenz/client/microgrid/component/_inverter.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
The type of this inverter.
Note
This should not be used normally, you should test if a inverter
isinstance of a concrete inverter class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new inverter type yet (i.e. for use with
UnrecognizedInverter).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.BatteryType ¤
Bases: Enum
The known types of batteries.
Source code in frequenz/client/microgrid/component/_battery.py
frequenz.client.microgrid.component.Chp
dataclass
¤
Bases: Component
A combined heat and power (CHP) component.
Source code in frequenz/client/microgrid/component/_chp.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.Component
dataclass
¤
A base class for all components.
Source code in frequenz/client/microgrid/component/_component.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
Attributes¤
category
instance-attribute
¤
category: ComponentCategory | int
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.ComponentCategory ¤
Bases: Enum
The known categories of components that can be present in a microgrid.
Source code in frequenz/client/microgrid/component/_category.py
Attributes¤
BATTERY
class-attribute
instance-attribute
¤
A storage system for electrical energy, used by inverters.
CHP
class-attribute
instance-attribute
¤
A heat and power combustion plant (CHP stands for combined heat and power).
CONVERTER
class-attribute
instance-attribute
¤
A DC-DC converter.
CRYPTO_MINER
class-attribute
instance-attribute
¤
A crypto miner.
ELECTROLYZER
class-attribute
instance-attribute
¤
An electrolyzer for converting water into hydrogen and oxygen.
EV_CHARGER
class-attribute
instance-attribute
¤
A station for charging electrical vehicles.
GRID
class-attribute
instance-attribute
¤
GRID = deprecated_member(
ELECTRICAL_COMPONENT_CATEGORY_GRID_CONNECTION_POINT,
"GRID is deprecated, use GRID_CONNECTION_POINT instead",
)
The point where the local microgrid is connected to the grid (deprecated).
Deprecated in v0.18.0
Use
GRID_CONNECTION_POINT
instead.
GRID_CONNECTION_POINT
class-attribute
instance-attribute
¤
The point where the local microgrid is connected to the grid.
HVAC
class-attribute
instance-attribute
¤
A Heating, Ventilation, and Air Conditioning (HVAC) system.
INVERTER
class-attribute
instance-attribute
¤
An electricity generator, with batteries or solar energy.
METER
class-attribute
instance-attribute
¤
A meter, for measuring electrical metrics, e.g., current, voltage, etc.
POWER_TRANSFORMER
class-attribute
instance-attribute
¤
A power transformer.
A power transformer is designed for the bulk transfer of electrical energy. Its main job is to "step-up" or "step-down" voltage levels for efficient transmission and distribution of power.
Since power transformers try to keep the output power same as the input power (ignoring losses), when they step-up the voltage, the current gets proportionally reduced, and vice versa.
PRECHARGER
class-attribute
instance-attribute
¤
A precharge module.
Precharging involves gradually ramping up the DC voltage to prevent any potential damage to sensitive electrical components like capacitors.
While many inverters and batteries come equipped with in-built precharging mechanisms, some may lack this feature. In such cases, we need to use external precharging modules.
RELAY
class-attribute
instance-attribute
¤
A relay.
Relays generally have two states: open (connected) and closed (disconnected). They are generally placed in front of a component, e.g., an inverter, to control whether the component is connected to the grid or not.
UNSPECIFIED
class-attribute
instance-attribute
¤
The component category is unspecified, probably due to an error in the message.
VOLTAGE_TRANSFORMER
class-attribute
instance-attribute
¤
VOLTAGE_TRANSFORMER = deprecated_member(
ELECTRICAL_COMPONENT_CATEGORY_POWER_TRANSFORMER,
"VOLTAGE_TRANSFORMER is deprecated, use POWER_TRANSFORMER instead",
)
A voltage transformer (deprecated).
Deprecated in v0.18.0
Use
POWER_TRANSFORMER
instead.
frequenz.client.microgrid.component.ComponentConnection
dataclass
¤
A single electrical link between two components within a microgrid.
A component connection represents the physical wiring as viewed from the grid connection point, if one exists, or from the islanding point, in case of an islanded microgrids.
Physical Representation
This object is not about data flow but rather about the physical electrical connections between components. Therefore, the IDs for the source and destination components correspond to the actual setup within the microgrid.
Direction
The direction of the connection follows the flow of current away from the grid connection point, or in case of islands, away from the islanding point. This direction is aligned with positive current according to the [Passive Sign Convention] (https://en.wikipedia.org/wiki/Passive_sign_convention).
Historical Data
The timestamps of when a connection was created and terminated allow for tracking the changes over time to a microgrid, providing insights into when and how the microgrid infrastructure has been modified.
Source code in frequenz/client/microgrid/component/_connection.py
Attributes¤
destination
instance-attribute
¤
The unique ID of the component where the connection terminates.
This is the component towards which the current flows.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of the connection.
source
instance-attribute
¤
The unique identifier of the component where the connection originates.
This is aligned with the direction of current flow away from the grid connection point, or in case of islands, away from the islanding point.
Functions¤
__post_init__ ¤
Ensure that the source and destination components are different.
is_operational_at ¤
Check whether this connection is operational at a specific timestamp.
frequenz.client.microgrid.component.ComponentDataSamples
dataclass
¤
An aggregate of multiple metrics, states, and errors of a component.
Source code in frequenz/client/microgrid/component/_data_samples.py
Attributes¤
metric_samples
instance-attribute
¤
metric_samples: list[MetricSample]
The metrics sampled from the component.
states
instance-attribute
¤
states: list[ComponentStateSample]
The states sampled from the component.
frequenz.client.microgrid.component.ComponentErrorCode ¤
Bases: Enum
The various errors that a component can report.
Source code in frequenz/client/microgrid/component/_state_sample.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
Attributes¤
BATTERY_BLOCK_ERROR
class-attribute
instance-attribute
¤
Battery block error.
BATTERY_CALIBRATION_NEEDED
class-attribute
instance-attribute
¤
Battery calibration is needed.
BATTERY_CONTROLLER_ERROR
class-attribute
instance-attribute
¤
Battery controller error.
BATTERY_IMBALANCE
class-attribute
instance-attribute
¤
Battery system imbalance.
BATTERY_LOW_SOH
class-attribute
instance-attribute
¤
Low state of health (SOH) detected in the battery.
BATTERY_RELAY_ERROR
class-attribute
instance-attribute
¤
Battery relay error.
CONFIG_ERROR
class-attribute
instance-attribute
¤
Configuration error related to the component.
EV_CHARGING_CABLE_INVALID
class-attribute
instance-attribute
¤
Invalid EV cable.
EV_CHARGING_CABLE_LOCK_FAILED
class-attribute
instance-attribute
¤
EV cable lock failure.
EV_CHARGING_CABLE_UNPLUGGED_FROM_EV
class-attribute
instance-attribute
¤
EV_CHARGING_CABLE_UNPLUGGED_FROM_EV = ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CHARGING_CABLE_UNPLUGGED_FROM_EV
EV cable was abruptly unplugged from the vehicle.
EV_CHARGING_CABLE_UNPLUGGED_FROM_STATION
class-attribute
instance-attribute
¤
EV_CHARGING_CABLE_UNPLUGGED_FROM_STATION = ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CHARGING_CABLE_UNPLUGGED_FROM_STATION
EV cable was abruptly unplugged from the charging station.
EV_CONSUMER_INCOMPATIBLE
class-attribute
instance-attribute
¤
Incompatible EV plug.
EV_UNEXPECTED_PILOT_FAILURE
class-attribute
instance-attribute
¤
Unexpected pilot failure in an electric vehicle component.
FAULT_CURRENT
class-attribute
instance-attribute
¤
Fault current detected in the component.
FUSE_ERROR
class-attribute
instance-attribute
¤
The component's fuse has blown.
HARDWARE_INACCESSIBLE
class-attribute
instance-attribute
¤
Hardware of the component is inaccessible.
HIGH_HUMIDITY
class-attribute
instance-attribute
¤
The component is exposed to high humidity levels over the maximum rated value.
ILLEGAL_ELECTRICAL_COMPONENT_STATE_CODE_REQUESTED
class-attribute
instance-attribute
¤
ILLEGAL_ELECTRICAL_COMPONENT_STATE_CODE_REQUESTED = ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_ILLEGAL_COMPONENT_STATE_CODE_REQUESTED
Illegal state requested for the component.
INTERNAL
class-attribute
instance-attribute
¤
Internal error within the component.
OVERCURRENT
class-attribute
instance-attribute
¤
The component is drawing more current than the maximum rated value.
OVERCURRENT_CHARGING
class-attribute
instance-attribute
¤
The component's consumption current is over the maximum rated value during charging.
OVERCURRENT_DISCHARGING
class-attribute
instance-attribute
¤
The component's production current is over the maximum rated value during discharging.
OVERTEMPERATURE
class-attribute
instance-attribute
¤
The component is operating over the maximum rated temperature.
OVERVOLTAGE
class-attribute
instance-attribute
¤
The component is operating over the maximum rated voltage.
PLAUSIBILITY_ERROR
class-attribute
instance-attribute
¤
Plausibility issues within the system involving this component.
PRECHARGE_ERROR
class-attribute
instance-attribute
¤
The component's precharge unit has failed.
RELAY_CYCLE_LIMIT_REACHED
class-attribute
instance-attribute
¤
Relays have been cycled for the maximum number of times.
SHORT_CIRCUIT
class-attribute
instance-attribute
¤
Short circuit detected in the component.
SWITCH_ON_FAULT
class-attribute
instance-attribute
¤
The component could not be switched on.
UNAUTHORIZED
class-attribute
instance-attribute
¤
The component is unauthorized to perform the last requested action.
UNDERTEMPERATURE
class-attribute
instance-attribute
¤
The component is operating under the minimum rated temperature.
UNDERVOLTAGE
class-attribute
instance-attribute
¤
The component is operating under the minimum rated voltage.
UNDERVOLTAGE_SHUTDOWN
class-attribute
instance-attribute
¤
UNDERVOLTAGE_SHUTDOWN = deprecated_member(
ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_UNDERVOLTAGE,
"UNDERVOLTAGE_SHUTDOWN is deprecated, use UNDERVOLTAGE instead",
)
System shutdown due to undervoltage involving this component.
Deprecated in v0.18.0
Use
UNDERVOLTAGE
instead.
UNKNOWN
class-attribute
instance-attribute
¤
The component is reporting an unknown or undefined error.
This is used when the error can be retrieved from the component but it doesn't match any known error.
UNSPECIFIED
class-attribute
instance-attribute
¤
The error is unspecified (this should not be normally used).
frequenz.client.microgrid.component.ComponentStateCode ¤
Bases: Enum
The various states that a component can be in.
Source code in frequenz/client/microgrid/component/_state_sample.py
Attributes¤
CHARGING
class-attribute
instance-attribute
¤
The component is actively consuming energy.
DISCHARGING
class-attribute
instance-attribute
¤
The component is actively producing or releasing energy.
ERROR
class-attribute
instance-attribute
¤
The component is in an error state and may need attention.
EV_CHARGING_CABLE_LOCKED_AT_EV
class-attribute
instance-attribute
¤
The EV charging cable is locked at the vehicle end.
EV_CHARGING_CABLE_LOCKED_AT_STATION
class-attribute
instance-attribute
¤
EV_CHARGING_CABLE_LOCKED_AT_STATION = ELECTRICAL_COMPONENT_STATE_CODE_EV_CHARGING_CABLE_LOCKED_AT_STATION
The EV charging cable is locked at the charging station end.
EV_CHARGING_CABLE_PLUGGED_AT_EV
class-attribute
instance-attribute
¤
The EV charging cable is plugged into the vehicle.
EV_CHARGING_CABLE_PLUGGED_AT_STATION
class-attribute
instance-attribute
¤
EV_CHARGING_CABLE_PLUGGED_AT_STATION = ELECTRICAL_COMPONENT_STATE_CODE_EV_CHARGING_CABLE_PLUGGED_AT_STATION
The EV charging cable is plugged into the charging station.
EV_CHARGING_CABLE_UNPLUGGED
class-attribute
instance-attribute
¤
The EV charging cable is unplugged from the charging station.
OFF
class-attribute
instance-attribute
¤
The component has successfully switched off.
PRECHARGER_CLOSED
class-attribute
instance-attribute
¤
The precharger circuit is closed, allowing full current to flow to the main circuit.
PRECHARGER_OPEN
class-attribute
instance-attribute
¤
The precharger circuit is open, meaning it's not currently active.
PRECHARGER_PRECHARGING
class-attribute
instance-attribute
¤
The precharger is in a precharging state, preparing the main circuit for activation.
READY
class-attribute
instance-attribute
¤
The component is fully operational and ready for use.
RELAY_CLOSED
class-attribute
instance-attribute
¤
The relay is in a closed state, allowing current to flow.
RELAY_OPEN
class-attribute
instance-attribute
¤
The relay is in an open state, meaning no current can flow through.
STANDBY
class-attribute
instance-attribute
¤
The component is in standby mode and not immediately ready for operation.
SWITCHING_OFF
class-attribute
instance-attribute
¤
The component is in the process of switching off.
SWITCHING_ON
class-attribute
instance-attribute
¤
The component is in the process of switching on.
UNAVAILABLE
class-attribute
instance-attribute
¤
The component is temporarily unavailable for operation.
UNKNOWN
class-attribute
instance-attribute
¤
The component is in an unknown or undefined condition.
This is used when the state can be retrieved from the component but it doesn't match any known state.
UNSPECIFIED
class-attribute
instance-attribute
¤
The state is unspecified (this should not be normally used).
frequenz.client.microgrid.component.ComponentStateSample
dataclass
¤
A collection of the state, warnings, and errors for a component at a specific time.
Source code in frequenz/client/microgrid/component/_state_sample.py
Attributes¤
errors
instance-attribute
¤
errors: frozenset[ComponentErrorCode | int]
The set of errors for the component.
This set will only contain errors if the component is in an error state.
states
instance-attribute
¤
states: frozenset[ComponentStateCode | int]
The set of states of the component.
If the reported state is not known by the client (it could happen when using an
older version of the client with a newer version of the server), it will be
represented as an int and not the
ComponentStateCode.UNKNOWN
value (this value is used only when the state is not known by the server).
warnings
instance-attribute
¤
warnings: frozenset[ComponentErrorCode | int]
The set of warnings for the component.
frequenz.client.microgrid.component.Converter
dataclass
¤
Bases: Component
An AC-DC converter component.
Source code in frequenz/client/microgrid/component/_converter.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.CryptoMiner
dataclass
¤
Bases: Component
A crypto miner component.
Source code in frequenz/client/microgrid/component/_crypto_miner.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[CRYPTO_MINER] = CRYPTO_MINER
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.DcEvCharger
dataclass
¤
Bases: EvCharger
An EV charger that supports DC charging only.
Source code in frequenz/client/microgrid/component/_ev_charger.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[EV_CHARGER] = EV_CHARGER
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete EV charger class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
The type of this EV charger.
Note
This should not be used normally, you should test if a EV charger
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new EV charger type yet (i.e. for use with
UnrecognizedEvCharger).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.Electrolyzer
dataclass
¤
Bases: Component
An electrolyzer component.
Source code in frequenz/client/microgrid/component/_electrolyzer.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[ELECTROLYZER] = ELECTROLYZER
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.EvCharger
dataclass
¤
Bases: Component
An abstract EV charger component.
Source code in frequenz/client/microgrid/component/_ev_charger.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[EV_CHARGER] = EV_CHARGER
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete EV charger class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
instance-attribute
¤
type: EvChargerType | int
The type of this EV charger.
Note
This should not be used normally, you should test if a EV charger
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new EV charger type yet (i.e. for use with
UnrecognizedEvCharger).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.EvChargerType ¤
Bases: Enum
The known types of electric vehicle (EV) chargers.
Source code in frequenz/client/microgrid/component/_ev_charger.py
Attributes¤
AC
class-attribute
instance-attribute
¤
The EV charging station supports AC charging only.
DC
class-attribute
instance-attribute
¤
The EV charging station supports DC charging only.
HYBRID
class-attribute
instance-attribute
¤
The EV charging station supports both AC and DC.
UNSPECIFIED
class-attribute
instance-attribute
¤
The type of the EV charger is unspecified.
frequenz.client.microgrid.component.GridConnectionPoint
dataclass
¤
Bases: Component
A point where a microgrid connects to the grid.
The terms "Grid Connection Point" and "Point of Common Coupling" (PCC) are commonly used in the context.
While both terms describe a connection point to the grid, the
GridConnectionPoint is specifically the physical connection point of the
generation facility to the grid, often concerned with the technical and
ownership aspects of the connection.
In contrast, the PCC is is more specific in terms of electrical engineering. It refers to the point where a customer's local electrical system (such as a microgrid) connects to the utility distribution grid in such a way that it can affect other customers’ systems connected to the same network. It is the point where the grid and customer's electrical systems interface and where issues like power quality and supply regulations are assessed.
The term GridConnectionPoint is used to make it clear that what is referred
to here is the physical connection point of the local facility to the grid.
Note that this may also be the PCC in some cases.
Source code in frequenz/client/microgrid/component/_grid_connection_point.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[GRID_CONNECTION_POINT] = (
GRID_CONNECTION_POINT
)
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
rated_fuse_current
instance-attribute
¤
rated_fuse_current: int
The maximum amount of electrical current that can flow through this connection, in amperes.
The rated maximum amount of current the fuse at the grid connection point is designed to safely carry under normal operating conditions.
This limit applies to currents both flowing in or out of each of the 3 phases individually.
In other words, a current iA at one of the phases of the grid connection
point must comply with the following constraint:
-rated_fuse_current <= i <= rated_fuse_current
Functions¤
__new__ ¤
Prevent instantiation of this class.
__post_init__ ¤
Validate the fuse's rated current.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.Hvac
dataclass
¤
Bases: Component
A heating, ventilation, and air conditioning (HVAC) component.
Source code in frequenz/client/microgrid/component/_hvac.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.HybridEvCharger
dataclass
¤
Bases: EvCharger
An EV charger that supports both AC and DC charging.
Source code in frequenz/client/microgrid/component/_ev_charger.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[EV_CHARGER] = EV_CHARGER
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete EV charger class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
The type of this EV charger.
Note
This should not be used normally, you should test if a EV charger
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new EV charger type yet (i.e. for use with
UnrecognizedEvCharger).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.HybridInverter
dataclass
¤
Bases: Inverter
A hybrid inverter.
Source code in frequenz/client/microgrid/component/_inverter.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
The type of this inverter.
Note
This should not be used normally, you should test if a inverter
isinstance of a concrete inverter class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new inverter type yet (i.e. for use with
UnrecognizedInverter).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.Inverter
dataclass
¤
Bases: Component
An abstract inverter component.
Source code in frequenz/client/microgrid/component/_inverter.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
instance-attribute
¤
type: InverterType | int
The type of this inverter.
Note
This should not be used normally, you should test if a inverter
isinstance of a concrete inverter class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new inverter type yet (i.e. for use with
UnrecognizedInverter).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.InverterType ¤
Bases: Enum
The known types of inverters.
Source code in frequenz/client/microgrid/component/_inverter.py
Attributes¤
BATTERY
class-attribute
instance-attribute
¤
The inverter is a battery inverter.
HYBRID
class-attribute
instance-attribute
¤
The inverter is a hybrid inverter.
SOLAR
class-attribute
instance-attribute
¤
The inverter is a solar inverter.
UNSPECIFIED
class-attribute
instance-attribute
¤
The type of the inverter is unspecified.
frequenz.client.microgrid.component.LiIonBattery
dataclass
¤
Bases: Battery
A Li-ion battery.
Source code in frequenz/client/microgrid/component/_battery.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
The type of this battery.
Note
This should not be used normally, you should test if a battery
isinstance of a concrete battery class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new battery type yet (i.e. for use with
UnrecognizedBattery).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.Meter
dataclass
¤
Bases: Component
A measuring meter component.
Source code in frequenz/client/microgrid/component/_meter.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.MismatchedCategoryComponent
dataclass
¤
Bases: ProblematicComponent
A component with a mismatch in the category.
This component declared a category but carries category specific metadata that doesn't match the declared category.
Source code in frequenz/client/microgrid/component/_problematic.py
Attributes¤
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.NaIonBattery
dataclass
¤
Bases: Battery
A Na-ion battery.
Source code in frequenz/client/microgrid/component/_battery.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
The type of this battery.
Note
This should not be used normally, you should test if a battery
isinstance of a concrete battery class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new battery type yet (i.e. for use with
UnrecognizedBattery).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.Precharger
dataclass
¤
Bases: Component
A precharger component.
Source code in frequenz/client/microgrid/component/_precharger.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[PRECHARGER] = PRECHARGER
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.ProblematicComponent
dataclass
¤
Bases: Component
An abstract component with a problem.
Source code in frequenz/client/microgrid/component/_problematic.py
Attributes¤
category
instance-attribute
¤
category: ComponentCategory | int
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.Relay
dataclass
¤
Bases: Component
A relay component.
Source code in frequenz/client/microgrid/component/_relay.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.SolarInverter
dataclass
¤
Bases: Inverter
A solar inverter.
Source code in frequenz/client/microgrid/component/_inverter.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
The type of this inverter.
Note
This should not be used normally, you should test if a inverter
isinstance of a concrete inverter class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new inverter type yet (i.e. for use with
UnrecognizedInverter).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.UnrecognizedBattery
dataclass
¤
Bases: Battery
A battery of an unrecognized type.
Source code in frequenz/client/microgrid/component/_battery.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.UnrecognizedComponent
dataclass
¤
Bases: ProblematicComponent
A component of an unrecognized type.
Source code in frequenz/client/microgrid/component/_problematic.py
Attributes¤
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.UnrecognizedEvCharger
dataclass
¤
Bases: EvCharger
An EV charger of an unrecognized type.
Source code in frequenz/client/microgrid/component/_ev_charger.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[EV_CHARGER] = EV_CHARGER
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete EV charger class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.UnrecognizedInverter
dataclass
¤
Bases: Inverter
An inverter component.
Source code in frequenz/client/microgrid/component/_inverter.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.UnspecifiedBattery
dataclass
¤
Bases: Battery
A battery of a unspecified type.
Source code in frequenz/client/microgrid/component/_battery.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
type: Literal[UNSPECIFIED] = UNSPECIFIED
The type of this battery.
Note
This should not be used normally, you should test if a battery
isinstance of a concrete battery class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new battery type yet (i.e. for use with
UnrecognizedBattery).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.UnspecifiedComponent
dataclass
¤
Bases: ProblematicComponent
A component of unspecified type.
Source code in frequenz/client/microgrid/component/_problematic.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[UNSPECIFIED] = UNSPECIFIED
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.UnspecifiedEvCharger
dataclass
¤
Bases: EvCharger
An EV charger of an unspecified type.
Source code in frequenz/client/microgrid/component/_ev_charger.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[EV_CHARGER] = EV_CHARGER
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete EV charger class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
type: Literal[UNSPECIFIED] = UNSPECIFIED
The type of this EV charger.
Note
This should not be used normally, you should test if a EV charger
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new EV charger type yet (i.e. for use with
UnrecognizedEvCharger).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.UnspecifiedInverter
dataclass
¤
Bases: Inverter
An inverter of an unspecified type.
Source code in frequenz/client/microgrid/component/_inverter.py
Attributes¤
category
class-attribute
instance-attribute
¤
The category of this component.
Note
This should not be used normally, you should test if a component
isinstance of a concrete component class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about a new category yet (i.e. for use with
UnrecognizedComponent)
and in case some low level code needs to know the category of a component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
type
class-attribute
instance-attribute
¤
type: Literal[UNSPECIFIED] = UNSPECIFIED
The type of this inverter.
Note
This should not be used normally, you should test if a inverter
isinstance of a concrete inverter class instead.
It is only provided for using with a newer version of the API where the client
doesn't know about the new inverter type yet (i.e. for use with
UnrecognizedInverter).
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |
Source code in frequenz/client/microgrid/component/_component.py
frequenz.client.microgrid.component.VoltageTransformer
dataclass
¤
Bases: Component
A voltage transformer component.
Voltage transformers are used to step up or step down the voltage, keeping the power somewhat constant by increasing or decreasing the current.
If voltage is stepped up, current is stepped down, and vice versa.
Note
Voltage transformers have efficiency losses, so the output power is always less than the input power.
Source code in frequenz/client/microgrid/component/_voltage_transformer.py
Attributes¤
category
class-attribute
instance-attribute
¤
category: Literal[POWER_TRANSFORMER] = POWER_TRANSFORMER
The category of this component.
category_specific_metadata
class-attribute
instance-attribute
¤
The category specific metadata of this component.
Note
This should not be used normally, it is only useful when accessing a newer
version of the API where the client doesn't know about the new metadata fields
yet (i.e. for use with
UnrecognizedComponent).
identity
property
¤
identity: tuple[ComponentId, MicrogridId]
The identity of this component.
This uses the component ID and microgrid ID to identify a component without considering the other attributes, so even if a component state changed, the identity remains the same.
manufacturer
class-attribute
instance-attribute
¤
manufacturer: str | None = None
The manufacturer of this component.
microgrid_id
instance-attribute
¤
The ID of the microgrid this component belongs to.
model_name
class-attribute
instance-attribute
¤
model_name: str | None = None
The model name of this component.
operational_lifetime
class-attribute
instance-attribute
¤
The operational lifetime of this component.
primary_voltage
instance-attribute
¤
primary_voltage: float
The primary voltage of the transformer, in volts.
This is the input voltage that is stepped up or down.
rated_bounds
class-attribute
instance-attribute
¤
List of rated bounds present for the component identified by Metric.
secondary_voltage
instance-attribute
¤
secondary_voltage: float
The secondary voltage of the transformer, in volts.
This is the output voltage that is the result of stepping the primary voltage up or down.
Functions¤
__new__ ¤
Prevent instantiation of this class.
is_operational_at ¤
Check whether this component is operational at a specific timestamp.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp
|
The timestamp to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether this component is operational at the given timestamp. |