Skip to content

Commit

Permalink
Merge pull request #663 from WillCodeForCats/662-use-unitofreactivepo…
Browse files Browse the repository at this point in the history
…wer-class-enum

Use UnitOfReactivePower class enum
  • Loading branch information
WillCodeForCats authored Oct 14, 2024
2 parents fbb0197 + 407a524 commit 2139dfb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ After rebooting Home Assistant, this integration can be configured through the i
[WillCodeForCats/solaredge-modbus-multi/wiki](https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki)

### Required Versions
* Home Assistant 2024.4.0 or newer
* Home Assistant 2024.9.0 or newer
* Python 3.11 or newer
* pymodbus 3.6.6 or newer

Expand Down
4 changes: 2 additions & 2 deletions custom_components/solaredge_modbus_multi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
PERCENTAGE,
POWER_VOLT_AMPERE_REACTIVE,
UnitOfApparentPower,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfEnergy,
UnitOfFrequency,
UnitOfPower,
UnitOfReactivePower,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
Expand Down Expand Up @@ -702,7 +702,7 @@ def suggested_display_precision(self):
class ACVoltAmpReactive(SolarEdgeSensorBase):
device_class = SensorDeviceClass.REACTIVE_POWER
state_class = SensorStateClass.MEASUREMENT
native_unit_of_measurement = POWER_VOLT_AMPERE_REACTIVE
native_unit_of_measurement = UnitOfReactivePower.VOLT_AMPERE_REACTIVE

def __init__(self, platform, config_entry, coordinator, phase: str = None):
super().__init__(platform, config_entry, coordinator)
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "SolarEdge Modbus Multi",
"content_in_root": false,
"homeassistant": "2024.4.0"
"homeassistant": "2024.9.0"
}

0 comments on commit 2139dfb

Please sign in to comment.