Revert UnitOfReactivePower change from iotawatt (#124393)
Revert "Change POWER_VOLT_AMPERE_REACTIVE to UnitOfReactivePower (#117153)"
This reverts commit 3e53cc175f
.
pull/123248/head^2
parent
ab6d0e3277
commit
4e3bd55c73
|
@ -7,6 +7,7 @@ import json
|
|||
import httpx
|
||||
|
||||
DOMAIN = "iotawatt"
|
||||
VOLT_AMPERE_REACTIVE = "VAR"
|
||||
VOLT_AMPERE_REACTIVE_HOURS = "VARh"
|
||||
|
||||
CONNECTION_ERRORS = (KeyError, json.JSONDecodeError, httpx.HTTPError)
|
||||
|
|
|
@ -23,7 +23,6 @@ from homeassistant.const import (
|
|||
UnitOfEnergy,
|
||||
UnitOfFrequency,
|
||||
UnitOfPower,
|
||||
UnitOfReactivePower,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
|
@ -32,7 +31,7 @@ from homeassistant.helpers.typing import StateType
|
|||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
from homeassistant.util import dt as dt_util
|
||||
|
||||
from .const import DOMAIN, VOLT_AMPERE_REACTIVE_HOURS
|
||||
from .const import DOMAIN, VOLT_AMPERE_REACTIVE, VOLT_AMPERE_REACTIVE_HOURS
|
||||
from .coordinator import IotawattUpdater
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -90,7 +89,7 @@ ENTITY_DESCRIPTION_KEY_MAP: dict[str, IotaWattSensorEntityDescription] = {
|
|||
),
|
||||
"VAR": IotaWattSensorEntityDescription(
|
||||
key="VAR",
|
||||
native_unit_of_measurement=UnitOfReactivePower.VOLT_AMPERE_REACTIVE,
|
||||
native_unit_of_measurement=VOLT_AMPERE_REACTIVE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:flash",
|
||||
entity_registry_enabled_default=False,
|
||||
|
|
Loading…
Reference in New Issue