mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 06:20:07 +00:00
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:
committed by
GitHub
parent
b21b300625
commit
3e53cc175f
@@ -10,11 +10,11 @@ from homeassistant.const import (
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
LIGHT_LUX,
|
||||
PERCENTAGE,
|
||||
POWER_VOLT_AMPERE_REACTIVE,
|
||||
SIGNAL_STRENGTH_DECIBELS,
|
||||
UnitOfApparentPower,
|
||||
UnitOfFrequency,
|
||||
UnitOfPressure,
|
||||
UnitOfReactivePower,
|
||||
UnitOfVolume,
|
||||
)
|
||||
|
||||
@@ -44,7 +44,7 @@ UNITS_OF_MEASUREMENT = {
|
||||
SensorDeviceClass.ENERGY: "kWh", # energy (Wh/kWh/MWh)
|
||||
SensorDeviceClass.FREQUENCY: UnitOfFrequency.GIGAHERTZ, # energy (Hz/kHz/MHz/GHz)
|
||||
SensorDeviceClass.POWER_FACTOR: PERCENTAGE, # power factor (no unit, min: -1.0, max: 1.0)
|
||||
SensorDeviceClass.REACTIVE_POWER: POWER_VOLT_AMPERE_REACTIVE, # reactive power (var)
|
||||
SensorDeviceClass.REACTIVE_POWER: UnitOfReactivePower.VOLT_AMPERE_REACTIVE, # reactive power (var)
|
||||
SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS: CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, # µg/m³ of vocs
|
||||
SensorDeviceClass.VOLTAGE: "V", # voltage (V)
|
||||
SensorDeviceClass.GAS: UnitOfVolume.CUBIC_METERS, # gas (m³)
|
||||
|
||||
Reference in New Issue
Block a user