From dcc2c93ae5c82525c864556da8f59119a0165c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=98eho=C5=99?= Date: Tue, 19 Nov 2024 20:00:11 +0100 Subject: [PATCH] Remove Solax Remaining Battery Capacity state class The state class for the Remaining Battery Capacity should be removed, consistent with other battery capacity sensors using the ENERGY device class. The ENERGY device class cannot use the MEASUREMENT state class. --- custom_components/solax_modbus/plugin_solax.py | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/solax_modbus/plugin_solax.py b/custom_components/solax_modbus/plugin_solax.py index 245d6b9d..02e68f7b 100644 --- a/custom_components/solax_modbus/plugin_solax.py +++ b/custom_components/solax_modbus/plugin_solax.py @@ -5244,7 +5244,6 @@ 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,