From fef0f11e89a4af098f682486f99c6a60e6047b63 Mon Sep 17 00:00:00 2001 From: Vincent Wolsink Date: Thu, 12 Sep 2024 18:59:01 +0200 Subject: [PATCH] Update deprecated constant --- custom_components/enphase_envoy/const.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/enphase_envoy/const.py b/custom_components/enphase_envoy/const.py index 267ed0d..5df269a 100644 --- a/custom_components/enphase_envoy/const.py +++ b/custom_components/enphase_envoy/const.py @@ -22,7 +22,7 @@ UnitOfElectricPotential, UnitOfElectricCurrent, UnitOfTemperature, - POWER_VOLT_AMPERE_REACTIVE, + UnitOfReactivePower, EntityCategory, ) @@ -350,7 +350,7 @@ def get_model_name(model, hardware_id): SensorEntityDescription( key=f"reactive_power_{phase}", name=f"Reactive Power {phase.upper()}", - native_unit_of_measurement=POWER_VOLT_AMPERE_REACTIVE, + native_unit_of_measurement=UnitOfReactivePower.VOLT_AMPERE_REACTIVE, state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.REACTIVE_POWER, ),