Skip to content

Commit

Permalink
Merge pull request #1154 from Kars-de-Jong/fix-solax-mic-inverter-and…
Browse files Browse the repository at this point in the history
…-measured-power

Fix inverter and measured power for older SolaX MIC inverters
  • Loading branch information
wills106 authored Dec 22, 2024
2 parents acff8cd + 518dc1e commit f266289
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions custom_components/solax_modbus/plugin_solax.py
Original file line number Diff line number Diff line change
Expand Up @@ -6036,7 +6036,7 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict):
native_unit_of_measurement = UnitOfPower.WATT,
device_class = SensorDeviceClass.POWER,
state_class = SensorStateClass.MEASUREMENT,
allowedtypes = AC | HYBRID | GEN2 | GEN3 | GEN4 | GEN5,
allowedtypes = AC | HYBRID | MIC | GEN | GEN2 | GEN3 | GEN4 | GEN5,
icon = "mdi:home-lightning-bolt",
),
SolaXModbusSensorEntityDescription(
Expand Down Expand Up @@ -6400,8 +6400,8 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict):
entity_category = EntityCategory.DIAGNOSTIC,
),
SolaXModbusSensorEntityDescription(
name = "Measured Power",
key = "measured_power",
name = "Inverter Power",
key = "inverter_power",
native_unit_of_measurement = UnitOfPower.WATT,
device_class = SensorDeviceClass.POWER,
state_class = SensorStateClass.MEASUREMENT,
Expand All @@ -6424,34 +6424,34 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict):
icon = "mdi:run",
),
SolaXModbusSensorEntityDescription(
name = "Measured Power L1",
key = "measured_power_l1",
name = "Inverter Power L1",
key = "inverter_power_l1",
native_unit_of_measurement = UnitOfPower.WATT,
device_class = SensorDeviceClass.POWER,
state_class = SensorStateClass.MEASUREMENT,
register = 0x410,
register_type = REG_INPUT,
allowedtypes = MIC | GEN | X3,
allowedtypes = MIC | GEN | GEN2 | X3,
),
SolaXModbusSensorEntityDescription(
name = "Measured Power L2",
key = "measured_power_l2",
name = "Inverter Power L2",
key = "inverter_power_l2",
native_unit_of_measurement = UnitOfPower.WATT,
device_class = SensorDeviceClass.POWER,
state_class = SensorStateClass.MEASUREMENT,
register = 0x411,
register_type = REG_INPUT,
allowedtypes = MIC | GEN | X3,
allowedtypes = MIC | GEN | GEN2 | X3,
),
SolaXModbusSensorEntityDescription(
name = "Measured Power L3",
key = "measured_power_l3",
name = "Inverter Power L3",
key = "inverter_power_l3",
native_unit_of_measurement = UnitOfPower.WATT,
device_class = SensorDeviceClass.POWER,
state_class = SensorStateClass.MEASUREMENT,
register = 0x412,
register_type = REG_INPUT,
allowedtypes = MIC | GEN | X3,
allowedtypes = MIC | GEN | GEN2 | X3,
),
SolaXModbusSensorEntityDescription(
name = "PV Power 1",
Expand Down Expand Up @@ -6587,8 +6587,8 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict):
icon = "mdi:solar-power-variant",
),
SolaXModbusSensorEntityDescription(
name = "Inverter Power",
key = "inverter_power",
name = "Measured Power",
key = "measured_power",
native_unit_of_measurement = UnitOfPower.WATT,
device_class = SensorDeviceClass.POWER,
state_class = SensorStateClass.MEASUREMENT,
Expand Down Expand Up @@ -6660,8 +6660,8 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict):
icon = "mdi:home-import-outline",
),
SolaXModbusSensorEntityDescription(
name = "Inverter Power",
key = "inverter_power",
name = "Measured Power",
key = "measured_power",
native_unit_of_measurement = UnitOfPower.WATT,
device_class = SensorDeviceClass.POWER,
state_class = SensorStateClass.MEASUREMENT,
Expand Down

0 comments on commit f266289

Please sign in to comment.