We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e8b5a0 commit a679033Copy full SHA for a679033
custom_components/bituopmd/sensor.py
@@ -9,11 +9,16 @@
9
UnitOfElectricCurrent,
10
UnitOfElectricPotential,
11
UnitOfApparentPower,
12
- POWER_VOLT_AMPERE_REACTIVE,
13
UnitOfPower,
14
PERCENTAGE,
15
SIGNAL_STRENGTH_DECIBELS,
16
)
+try:
17
+ from homeassistant.const import UnitOfReactivePower
18
+ POWER_VOLT_AMPERE_REACTIVE = UnitOfReactivePower.VOLT_AMPERE_REACTIVE
19
+except (ImportError, AttributeError):
20
+ from homeassistant.const import POWER_VOLT_AMPERE_REACTIVE
21
+
22
from homeassistant.helpers.entity import DeviceInfo
23
from homeassistant.components.sensor import SensorEntity, SensorDeviceClass, SensorStateClass
24
from homeassistant.helpers.update_coordinator import (
0 commit comments