diff --git a/custom_components/solax_modbus/plugin_solax.py b/custom_components/solax_modbus/plugin_solax.py index b0e30ea3..85122027 100644 --- a/custom_components/solax_modbus/plugin_solax.py +++ b/custom_components/solax_modbus/plugin_solax.py @@ -4032,6 +4032,7 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): key = "battery_capacity", native_unit_of_measurement = PERCENTAGE, device_class = SensorDeviceClass.BATTERY, + state_class = SensorStateClass.MEASUREMENT, register = 0x1C, register_type = REG_INPUT, allowedtypes = AC | HYBRID | GEN2 | GEN3 | GEN4, @@ -4703,6 +4704,7 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): key = "eps_yield_total", native_unit_of_measurement = UnitOfEnergy.KILO_WATT_HOUR, device_class = SensorDeviceClass.ENERGY, + state_class = SensorStateClass.TOTAL_INCREASING, register = 0x8E, register_type = REG_INPUT, unit = REGISTER_U32, @@ -4715,6 +4717,7 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): key = "eps_yield_total", native_unit_of_measurement = UnitOfEnergy.KILO_WATT_HOUR, device_class = SensorDeviceClass.ENERGY, + state_class = SensorStateClass.TOTAL_INCREASING, register = 0x8E, register_type = REG_INPUT, unit = REGISTER_U32, @@ -4725,6 +4728,7 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): key = "eps_yield_today", native_unit_of_measurement = UnitOfEnergy.KILO_WATT_HOUR, device_class = SensorDeviceClass.ENERGY, + state_class = SensorStateClass.MEASUREMENT, register = 0x90, register_type = REG_INPUT, scale = 0.1, @@ -5017,6 +5021,7 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): key = "battery_soh", icon = "mdi:battery-heart", native_unit_of_measurement = PERCENTAGE, + state_class = SensorStateClass.MEASUREMENT, register = 0xBF, register_type = REG_INPUT, entity_registry_enabled_default = False, @@ -5236,6 +5241,7 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): key = "remaining_battery_capacity", native_unit_of_measurement = UnitOfEnergy.WATT_HOUR, device_class = SensorDeviceClass.ENERGY, + state_class = SensorStateClass.MEASUREMENT, entity_registry_enabled_default = False, register = 0x118, register_type = REG_INPUT, @@ -5524,6 +5530,7 @@ def value_function_battery_voltage_cell_difference(initval, descr, datadict): key = "pm_battery_current_charge", native_unit_of_measurement = UnitOfElectricCurrent.AMPERE, device_class = SensorDeviceClass.CURRENT, + state_class = SensorStateClass.MEASUREMENT, register = 0x1FC, scale = 0.01, register_type = REG_INPUT,