Skip to content

Commit 54b9de3

Browse files
committed
Add steam boiler
Signed-off-by: Simon Völcker <simon.voelcker@frequenz.com>
1 parent 37db64e commit 54b9de3

5 files changed

Lines changed: 31 additions & 0 deletions

File tree

src/frequenz/client/assets/electrical_component/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
UnspecifiedComponent,
5151
)
5252
from ._static_transfer_switch import StaticTransferSwitch
53+
from ._steam_boiler import SteamBoiler
5354
from ._uninterruptible_power_supply import UninterruptiblePowerSupply
5455
from ._wind_turbine import WindTurbine
5556

@@ -91,6 +92,7 @@
9192
"MismatchedCategoryComponent",
9293
"UnrecognizedComponent",
9394
"UnspecifiedComponent",
95+
"SteamBoiler",
9496
"StaticTransferSwitch",
9597
"UninterruptiblePowerSupply",
9698
"WindTurbine",

src/frequenz/client/assets/electrical_component/_category.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,6 @@ class ElectricalComponentCategory(enum.Enum):
8686

8787
WIND_TURBINE = electrical_components_pb2.ELECTRICAL_COMPONENT_CATEGORY_WIND_TURBINE
8888
"""A wind turbine."""
89+
90+
STEAM_BOILER = electrical_components_pb2.ELECTRICAL_COMPONENT_CATEGORY_STEAM_BOILER
91+
"""A steam boiler."""

src/frequenz/client/assets/electrical_component/_electrical_component_proto.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
from ._precharger import Precharger
5858
from ._problematic import UnrecognizedComponent, UnspecifiedComponent
5959
from ._static_transfer_switch import StaticTransferSwitch
60+
from ._steam_boiler import SteamBoiler
6061
from ._types import ElectricalComponentType
6162
from ._uninterruptible_power_supply import UninterruptiblePowerSupply
6263
from ._wind_turbine import WindTurbine
@@ -219,6 +220,7 @@ def electrical_component_from_proto_with_issues(
219220
| ElectricalComponentCategory.PRECHARGER
220221
| ElectricalComponentCategory.BREAKER
221222
| ElectricalComponentCategory.PLC
223+
| ElectricalComponentCategory.STEAM_BOILER
222224
| ElectricalComponentCategory.STATIC_TRANSFER_SWITCH
223225
| ElectricalComponentCategory.UNINTERRUPTIBLE_POWER_SUPPLY
224226
| ElectricalComponentCategory.CAPACITOR_BANK
@@ -416,6 +418,7 @@ def _trivial_category_to_class(
416418
| Precharger
417419
| Breaker
418420
| Plc
421+
| SteamBoiler
419422
| StaticTransferSwitch
420423
| UninterruptiblePowerSupply
421424
| CapacitorBank
@@ -433,6 +436,7 @@ def _trivial_category_to_class(
433436
ElectricalComponentCategory.PRECHARGER: Precharger,
434437
ElectricalComponentCategory.BREAKER: Breaker,
435438
ElectricalComponentCategory.PLC: Plc,
439+
ElectricalComponentCategory.STEAM_BOILER: SteamBoiler,
436440
ElectricalComponentCategory.STATIC_TRANSFER_SWITCH: StaticTransferSwitch,
437441
ElectricalComponentCategory.UNINTERRUPTIBLE_POWER_SUPPLY: UninterruptiblePowerSupply,
438442
ElectricalComponentCategory.CAPACITOR_BANK: CapacitorBank,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# License: MIT
2+
# Copyright © 2026 Frequenz Energy-as-a-Service GmbH
3+
4+
"""Steam boiler component."""
5+
6+
import dataclasses
7+
from typing import Literal
8+
9+
from ._category import ElectricalComponentCategory
10+
from ._electrical_component import ElectricalComponent
11+
12+
13+
@dataclasses.dataclass(frozen=True, kw_only=True)
14+
class SteamBoiler(ElectricalComponent):
15+
"""A steam boiler."""
16+
17+
category: Literal[ElectricalComponentCategory.STEAM_BOILER] = (
18+
ElectricalComponentCategory.STEAM_BOILER
19+
)
20+
"""The category of this component."""

src/frequenz/client/assets/electrical_component/_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
UnspecifiedComponent,
2727
)
2828
from ._static_transfer_switch import StaticTransferSwitch
29+
from ._steam_boiler import SteamBoiler
2930
from ._uninterruptible_power_supply import UninterruptiblePowerSupply
3031
from ._wind_turbine import WindTurbine
3132

@@ -60,6 +61,7 @@
6061
| Precharger
6162
| Breaker
6263
| Plc
64+
| SteamBoiler
6365
| StaticTransferSwitch
6466
| UninterruptiblePowerSupply
6567
| CapacitorBank

0 commit comments

Comments
 (0)