Skip to content

Commit 2139dfb

Browse files
Merge pull request #663 from WillCodeForCats/662-use-unitofreactivepower-class-enum
Use UnitOfReactivePower class enum
2 parents fbb0197 + 407a524 commit 2139dfb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ After rebooting Home Assistant, this integration can be configured through the i
3838
[WillCodeForCats/solaredge-modbus-multi/wiki](https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki)
3939

4040
### Required Versions
41-
* Home Assistant 2024.4.0 or newer
41+
* Home Assistant 2024.9.0 or newer
4242
* Python 3.11 or newer
4343
* pymodbus 3.6.6 or newer
4444

custom_components/solaredge_modbus_multi/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
from homeassistant.config_entries import ConfigEntry
1212
from homeassistant.const import (
1313
PERCENTAGE,
14-
POWER_VOLT_AMPERE_REACTIVE,
1514
UnitOfApparentPower,
1615
UnitOfElectricCurrent,
1716
UnitOfElectricPotential,
1817
UnitOfEnergy,
1918
UnitOfFrequency,
2019
UnitOfPower,
20+
UnitOfReactivePower,
2121
UnitOfTemperature,
2222
)
2323
from homeassistant.core import HomeAssistant, callback
@@ -702,7 +702,7 @@ def suggested_display_precision(self):
702702
class ACVoltAmpReactive(SolarEdgeSensorBase):
703703
device_class = SensorDeviceClass.REACTIVE_POWER
704704
state_class = SensorStateClass.MEASUREMENT
705-
native_unit_of_measurement = POWER_VOLT_AMPERE_REACTIVE
705+
native_unit_of_measurement = UnitOfReactivePower.VOLT_AMPERE_REACTIVE
706706

707707
def __init__(self, platform, config_entry, coordinator, phase: str = None):
708708
super().__init__(platform, config_entry, coordinator)

hacs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "SolarEdge Modbus Multi",
33
"content_in_root": false,
4-
"homeassistant": "2024.4.0"
4+
"homeassistant": "2024.9.0"
55
}

0 commit comments

Comments
 (0)