From fef7079ff64276c48701a0cba4e35b3551e5ebd1 Mon Sep 17 00:00:00 2001 From: Mikael Andersson Date: Wed, 20 Nov 2024 14:49:04 +0100 Subject: [PATCH] Add entity Main Breaker Current Limit --- .../solax_modbus/plugin_solax.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/custom_components/solax_modbus/plugin_solax.py b/custom_components/solax_modbus/plugin_solax.py index b968fc8c..abc86fac 100644 --- a/custom_components/solax_modbus/plugin_solax.py +++ b/custom_components/solax_modbus/plugin_solax.py @@ -803,6 +803,18 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): allowedtypes = AC | HYBRID | GEN4 | GEN5, icon = "mdi:battery-charging-high", ), + SolaxModbusNumberEntityDescription( + name = "Main Breaker Current Limit", + key = "main_breaker_current_limit", + register = 0x71, + fmt = "i", + native_min_value = 10, + native_max_value = 250, + native_step = 1, + native_unit_of_measurement = UnitOfElectricCurrent.AMPERE, + device_class = NumberDeviceClass.CURRENT, + allowedtypes = AC | HYBRID | GEN4 | GEN5, + ), SolaxModbusNumberEntityDescription( name = "Feedin On Power", key = "feedin_on_power", @@ -2842,6 +2854,13 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): allowedtypes = HYBRID | GEN4 | GEN5, internal = True, ), + SolaXModbusSensorEntityDescription( + name = "Main Breaker Current Limit", + key = "main_breaker_current_limit", + register = 0xD7, + allowedtypes = AC | HYBRID | GEN4 | GEN5, + internal = True, + ), SolaXModbusSensorEntityDescription( name = "Battery Install Capacity", key = "battery_install_capacity",