Introduce unit enums for apparent power (#83451)

This commit is contained in:
epenet
2022-12-08 18:23:23 +01:00
committed by GitHub
parent 9987f7a125
commit 0eacd84ff3

View File

@@ -477,9 +477,17 @@ ATTR_TEMPERATURE: Final = "temperature"
# Persons attribute
ATTR_PERSONS: Final = "persons"
# #### UNITS OF MEASUREMENT ####
# Apparent power units
class UnitOfApparentPower(StrEnum):
"""Apparent power units."""
VOLT_AMPERE = "VA"
POWER_VOLT_AMPERE: Final = "VA"
"""Deprecated: please use UnitOfApparentPower.VOLT_AMPERE."""
# Power units