Skip to content

Commit

Permalink
2024.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wills106 committed Nov 10, 2024
1 parent 1243dc8 commit 16cd3f2
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/solax_modbus/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/wills106/homsassistant-solax-modbus/issues",
"requirements": ["pymodbus>=3.6.8"],
"version": "2024.11.1"
"version": "2024.11.2"
}
40 changes: 40 additions & 0 deletions custom_components/solax_modbus/plugin_growatt.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,28 @@ def value_function_inverter_module(initval, descr, datadict):
# Normal select types
#
###
GrowattModbusSelectEntityDescription(
name = "Inverter Switch",
key = "inverter_switch",
register = 0,
option_dict = {
0: "Inverter Off",
1: "Inverter On", },
allowedtypes = GEN | SPF,
icon = "mdi:dip-switch",
),
GrowattModbusSelectEntityDescription(
name = "Inverter Switch",
key = "inverter_switch",
register = 0,
option_dict = {
0: "Inverter Off",
1: "Inverter On",
2: "BDC Off",
3: "BDC On", },
allowedtypes = GEN2 | GEN3 | GEN4,
icon = "mdi:dip-switch",
),
GrowattModbusSelectEntityDescription(
name = "Select baud rate",
key = "select_baud_rate",
Expand Down Expand Up @@ -1370,6 +1392,24 @@ def value_function_inverter_module(initval, descr, datadict):
# ================================= Sennsor Declarations ============================================================

SENSOR_TYPES: list[GrowattModbusSensorEntityDescription] = [
GrowattModbusSensorEntityDescription(
key = "inverter_switch",
register = 0,
scale = { 0: "Inverter Off",
1: "Inverter On", },
allowedtypes = GEN | SPF,
internal = True,
),
GrowattModbusSensorEntityDescription(
key = "inverter_switch",
register = 0,
scale = { 0: "Inverter Off",
1: "Inverter On",
2: "BDC Off",
3: "BDC On", },
allowedtypes = GEN2 | GEN3 | GEN4,
internal = True,
),
GrowattModbusSensorEntityDescription(
key = "active_power_limit",
register = 3,
Expand Down
7 changes: 5 additions & 2 deletions custom_components/solax_modbus/plugin_solax.py
Original file line number Diff line number Diff line change
Expand Up @@ -6101,14 +6101,14 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict):
key = "firmware_dsp",
register = 0x33D,
allowedtypes = MIC | GEN,
blacklist=('MU802T',),
blacklist=('MC502T', 'MU802T',),
internal = True,
),
SolaXModbusSensorEntityDescription(
key = "firmware_arm",
register = 0x33E,
allowedtypes = MIC | GEN,
blacklist=('MU802T',),
blacklist=('MC502T', 'MU802T',),
internal = True,
),
SolaXModbusSensorEntityDescription(
Expand Down Expand Up @@ -7690,6 +7690,9 @@ async def async_determineInverterType(self, hub, configdict):
elif seriesnumber.startswith('MU803T'):
invertertype = MIC | GEN | X3 # MIC X3
self.inverter_model = "X3-MIC"
elif seriesnumber.startswith('MU902T'):
invertertype = MIC | GEN | X3 # MIC X3
self.inverter_model = "X3-MIC"
elif seriesnumber.startswith('MC806T'):
invertertype = MIC | GEN2 | X3 # MIC X3
self.inverter_model = "X3-MIC"
Expand Down

0 comments on commit 16cd3f2

Please sign in to comment.