mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Extend UnitOfReactivePower with 'kvar' (#142558)
This commit is contained in:
parent
76015740f8
commit
1b66278a68
@ -323,7 +323,7 @@ class NumberDeviceClass(StrEnum):
|
||||
REACTIVE_POWER = "reactive_power"
|
||||
"""Reactive power.
|
||||
|
||||
Unit of measurement: `var`
|
||||
Unit of measurement: `var`, `kvar`
|
||||
"""
|
||||
|
||||
SIGNAL_STRENGTH = "signal_strength"
|
||||
@ -497,7 +497,7 @@ DEVICE_CLASS_UNITS: dict[NumberDeviceClass, set[type[StrEnum] | str | None]] = {
|
||||
NumberDeviceClass.PRECIPITATION: set(UnitOfPrecipitationDepth),
|
||||
NumberDeviceClass.PRECIPITATION_INTENSITY: set(UnitOfVolumetricFlux),
|
||||
NumberDeviceClass.PRESSURE: set(UnitOfPressure),
|
||||
NumberDeviceClass.REACTIVE_POWER: {UnitOfReactivePower.VOLT_AMPERE_REACTIVE},
|
||||
NumberDeviceClass.REACTIVE_POWER: set(UnitOfReactivePower),
|
||||
NumberDeviceClass.SIGNAL_STRENGTH: {
|
||||
SIGNAL_STRENGTH_DECIBELS,
|
||||
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
|
@ -352,7 +352,7 @@ class SensorDeviceClass(StrEnum):
|
||||
REACTIVE_POWER = "reactive_power"
|
||||
"""Reactive power.
|
||||
|
||||
Unit of measurement: `var`
|
||||
Unit of measurement: `var`, `kvar`
|
||||
"""
|
||||
|
||||
SIGNAL_STRENGTH = "signal_strength"
|
||||
@ -596,7 +596,7 @@ DEVICE_CLASS_UNITS: dict[SensorDeviceClass, set[type[StrEnum] | str | None]] = {
|
||||
SensorDeviceClass.PRECIPITATION: set(UnitOfPrecipitationDepth),
|
||||
SensorDeviceClass.PRECIPITATION_INTENSITY: set(UnitOfVolumetricFlux),
|
||||
SensorDeviceClass.PRESSURE: set(UnitOfPressure),
|
||||
SensorDeviceClass.REACTIVE_POWER: {UnitOfReactivePower.VOLT_AMPERE_REACTIVE},
|
||||
SensorDeviceClass.REACTIVE_POWER: set(UnitOfReactivePower),
|
||||
SensorDeviceClass.SIGNAL_STRENGTH: {
|
||||
SIGNAL_STRENGTH_DECIBELS,
|
||||
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
|
@ -603,6 +603,7 @@ class UnitOfReactivePower(StrEnum):
|
||||
"""Reactive power units."""
|
||||
|
||||
VOLT_AMPERE_REACTIVE = "var"
|
||||
KILO_VOLT_AMPERE_REACTIVE = "kvar"
|
||||
|
||||
|
||||
_DEPRECATED_POWER_VOLT_AMPERE_REACTIVE: Final = DeprecatedConstantEnum(
|
||||
|
Loading…
x
Reference in New Issue
Block a user