Skip to content

Commit

Permalink
Merge pull request #642 from cewbdex/wished-entitites
Browse files Browse the repository at this point in the history
SolaX G4 - add battery SOH, low and high values of battery temperature + cell voltage
  • Loading branch information
wills106 authored Dec 1, 2023
2 parents b8e3109 + ba46724 commit 3815ee3
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions custom_components/solax_modbus/plugin_solax.py
Original file line number Diff line number Diff line change
Expand Up @@ -4607,6 +4607,64 @@ def value_function_remotecontrol_autorepeat_remaining(initval, descr, datadict):
allowedtypes = AC | HYBRID | GEN3 | GEN4,
entity_category = EntityCategory.DIAGNOSTIC,
),
SolaXModbusSensorEntityDescription(
name = "battery temp high",
key = "battery_temperature_high",
native_unit_of_measurement = UnitOfTemperature.CELSIUS,
device_class = SensorDeviceClass.TEMPERATURE,
register = 0xBA,
register_type = REG_INPUT,
unit = REGISTER_S16,
scale = 0.1,
entity_registry_enabled_default = False,
allowedtypes = GEN4,
),
SolaXModbusSensorEntityDescription(
name = "battery temp low",
key = "battery_temperature_low",
native_unit_of_measurement = UnitOfTemperature.CELSIUS,
device_class = SensorDeviceClass.TEMPERATURE,
register = 0xBB,
register_type = REG_INPUT,
unit = REGISTER_S16,
scale = 0.1,
entity_registry_enabled_default = False,
allowedtypes = GEN4,
),
SolaXModbusSensorEntityDescription(
name = "Cell voltage high",
key = "cell_voltage_high",
native_unit_of_measurement = UnitOfElectricPotential.VOLT,
device_class = SensorDeviceClass.VOLTAGE,
register = 0xBC,
register_type = REG_INPUT,
scale = 0.001,
rounding = 3,
entity_registry_enabled_default = False,
allowedtypes = GEN4,
),
SolaXModbusSensorEntityDescription(
name = "Cell voltage low",
key = "cell_voltage_low",
native_unit_of_measurement = UnitOfElectricPotential.VOLT,
device_class = SensorDeviceClass.VOLTAGE,
register = 0xBD,
register_type = REG_INPUT,
scale = 0.001,
rounding = 3,
entity_registry_enabled_default = False,
allowedtypes = GEN4,
),
SolaXModbusSensorEntityDescription(
name = "Battery State of Health",
key = "battery_soh",
icon = "mdi:battery-heart",
native_unit_of_measurement = PERCENTAGE,
register = 0xBF,
register_type = REG_INPUT,
entity_registry_enabled_default = False,
allowedtypes = GEN4,
),
SolaXModbusSensorEntityDescription(
name = "Grid Frequency",
key = "grid_frequency_meter",
Expand Down

0 comments on commit 3815ee3

Please sign in to comment.