Skip to content

Commit

Permalink
Add some missing addresses from https://github.com/TonyM1958/HA-FoxES…
Browse files Browse the repository at this point in the history
  • Loading branch information
canton7 committed Apr 20, 2023
1 parent bad9280 commit 460ad5b
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions custom_components/foxess_modbus/entities/entity_descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
_H1_CURRENT_VOLTAGE_POWER_ENTITIES = [
ModbusSensorDescription(
key="invbatvolt",
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11006])],
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11006], holding=[31020])],
name="Inverter Battery Voltage",
device_class=SensorDeviceClass.VOLTAGE,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -162,7 +162,7 @@
),
ModbusSensorDescription(
key="invbatcurrent",
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11007])],
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11007], holding=[31021])],
name="Inverter Battery Current",
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
Expand Down Expand Up @@ -511,7 +511,7 @@
),
ModbusSensorDescription(
key="rpower",
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11011])],
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11011], holding=[31008])],
name="Inverter Power",
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -536,17 +536,42 @@
),
ModbusSensorDescription(
key="eps_rvolt",
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11015])],
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11015], holding=[31010])],
name="EPS Voltage",
device_class=SensorDeviceClass.VOLTAGE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement="V",
scale=0.1,
validate=[Range(0, 300)],
),
ModbusSensorDescription(
key="eps_rcurrent",
addresses=[
ModbusAddressesSpec(
models=[H1, AIO_H1, AC1], input=[11016], holding=[31011]
)
],
name="EPS Current",
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement="A",
scale=0.1,
validate=[Range(0, 100)],
),
ModbusSensorDescription(
key="eps_rpower",
addresses=[ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11017], holding=[31012])],
name="EPS Power",
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement="kW",
scale=0.001,
validate=[Range(-10000, 10000)],
),
ModbusSensorDescription(
key="eps_frequency",
addresses=[
ModbusAddressesSpec(models=[H1, AIO_H1, AC1], input=[11020], holding=[31013]),
ModbusAddressesSpec(models=[H3], holding=[31025]),
],
name="Inverter Frequency",
Expand Down

0 comments on commit 460ad5b

Please sign in to comment.