Introduce unit enums for electric current and potential (#83287)
* Introduce UnitOfElectricCurrent enum * Introduce UnitOfElectricalPotential enum * UnitOfElectricalPotential > UnitOfElectricPotentialpull/83357/head
parent
f1ce8a9004
commit
7eda67be11
|
@ -519,13 +519,33 @@ ENERGY_MEGA_WATT_HOUR: Final = "MWh"
|
|||
ENERGY_WATT_HOUR: Final = "Wh"
|
||||
"""Deprecated: please use UnitOfEnergy.WATT_HOUR."""
|
||||
|
||||
|
||||
# Electric_current units
|
||||
class UnitOfElectricCurrent(StrEnum):
|
||||
"""Electric current units."""
|
||||
|
||||
MILLIAMPERE = "mA"
|
||||
AMPERE = "A"
|
||||
|
||||
|
||||
ELECTRIC_CURRENT_MILLIAMPERE: Final = "mA"
|
||||
"""Deprecated: please use UnitOfElectricCurrent.MILLIAMPERE."""
|
||||
ELECTRIC_CURRENT_AMPERE: Final = "A"
|
||||
"""Deprecated: please use UnitOfElectricCurrent.AMPERE."""
|
||||
|
||||
|
||||
# Electric_potential units
|
||||
class UnitOfElectricPotential(StrEnum):
|
||||
"""Electric potential units."""
|
||||
|
||||
MILLIVOLT = "mV"
|
||||
VOLT = "V"
|
||||
|
||||
|
||||
ELECTRIC_POTENTIAL_MILLIVOLT: Final = "mV"
|
||||
"""Deprecated: please use UnitOfElectricPotential.MILLIVOLT."""
|
||||
ELECTRIC_POTENTIAL_VOLT: Final = "V"
|
||||
"""Deprecated: please use UnitOfElectricPotential.VOLT."""
|
||||
|
||||
# Degree units
|
||||
DEGREE: Final = "°"
|
||||
|
|
Loading…
Reference in New Issue