File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/frequenz/client/microgrid Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,11 @@ def __str__(self) -> str:
203203 return f"{ type (self )._str_prefix } { self ._id } "
204204
205205
206+ @final
207+ class EnterpriseId (BaseId , str_prefix = "EID" ):
208+ """A unique identifier for an enterprise account."""
209+
210+
206211@final
207212class MicrogridId (BaseId , str_prefix = "MID" ):
208213 """A unique identifier for a microgrid."""
Original file line number Diff line number Diff line change 11# License: MIT
22# Copyright © 2025 Frequenz Energy-as-a-Service GmbH
33
4- """Tests for the microgrid and component IDs."""
4+ """Tests for IDs."""
55
66from dataclasses import dataclass
77
88import pytest
99
10- from frequenz .client .microgrid .id import ComponentId , MicrogridId , SensorId
10+ from frequenz .client .microgrid .id import (
11+ ComponentId ,
12+ EnterpriseId ,
13+ MicrogridId ,
14+ SensorId ,
15+ )
1116
1217
1318@dataclass (frozen = True )
@@ -20,6 +25,7 @@ class IdTypeInfo:
2025
2126# Define all ID types to test here
2227ID_TYPES : list [IdTypeInfo ] = [
28+ IdTypeInfo (EnterpriseId , "EID" ),
2329 IdTypeInfo (MicrogridId , "MID" ),
2430 IdTypeInfo (ComponentId , "CID" ),
2531 IdTypeInfo (SensorId , "SID" ),
You can’t perform that action at this time.
0 commit comments