diff --git a/custom_components/solax_modbus/manifest.json b/custom_components/solax_modbus/manifest.json index 764400e0..783147fc 100644 --- a/custom_components/solax_modbus/manifest.json +++ b/custom_components/solax_modbus/manifest.json @@ -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" } diff --git a/custom_components/solax_modbus/plugin_growatt.py b/custom_components/solax_modbus/plugin_growatt.py index 77904e8a..dae70c92 100644 --- a/custom_components/solax_modbus/plugin_growatt.py +++ b/custom_components/solax_modbus/plugin_growatt.py @@ -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", @@ -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, diff --git a/custom_components/solax_modbus/plugin_solax.py b/custom_components/solax_modbus/plugin_solax.py index 1adba5c9..af26ae36 100644 --- a/custom_components/solax_modbus/plugin_solax.py +++ b/custom_components/solax_modbus/plugin_solax.py @@ -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( @@ -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"