From 2c7f11e103b7600b7816bd28af7d0a2284666a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=98eho=C5=99?= Date: Tue, 19 Nov 2024 19:44:50 +0100 Subject: [PATCH] Fix Solax EPS Yield Today sensor state class The state class for the EPS Yield Today sensor should be set to TOTAL_INCREASING, consistent with other yield sensors. The ENERGY device class cannot use the MEASUREMENT state class. --- custom_components/solax_modbus/plugin_solax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solax_modbus/plugin_solax.py b/custom_components/solax_modbus/plugin_solax.py index 245d6b9d..b968fc8c 100644 --- a/custom_components/solax_modbus/plugin_solax.py +++ b/custom_components/solax_modbus/plugin_solax.py @@ -4731,7 +4731,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, + state_class = SensorStateClass.TOTAL_INCREASING, register = 0x90, register_type = REG_INPUT, scale = 0.1,