Change POWER_VOLT_AMPERE_REACTIVE to UnitOfReactivePower (#117153)

* Refactoring: exchange POWER_VOLT_AMPERE_REACTIVE with UnitOfReactivePower

* updated iotawatt and mysensors from VOLT_AMPERE_REACTIVE to UnitOfReactivePower.VOLT_AMPERE_REACTIVE

* deprecation period for POWER_VOLT_AMPERE_REACTIVE changed to one year.

* POWER_VOLT_AMPERE_REACTIVE changed to UnitOfReactivePower in blebox integration

* Update homeassistant/const.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
Christian Neumeier 2024-08-21 15:36:45 +02:00 committed by GitHub
parent b21b300625
commit 3e53cc175f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 68 additions and 56 deletions

View file

@ -673,8 +673,19 @@ _DEPRECATED_POWER_BTU_PER_HOUR: Final = DeprecatedConstantEnum(
)
"""Deprecated: please use UnitOfPower.BTU_PER_HOUR."""
# Reactive power units
POWER_VOLT_AMPERE_REACTIVE: Final = "var"
class UnitOfReactivePower(StrEnum):
"""Reactive power units."""
VOLT_AMPERE_REACTIVE = "var"
_DEPRECATED_POWER_VOLT_AMPERE_REACTIVE: Final = DeprecatedConstantEnum(
UnitOfReactivePower.VOLT_AMPERE_REACTIVE,
"2025.9",
)
"""Deprecated: please use UnitOfReactivePower.VOLT_AMPERE_REACTIVE."""
# Energy units