SAJ Solar inverter

I have integrated my SAJ H1 in home assistant 6 months ago and it works great. It would be nice if it updated the data more often but I understand that this depends on the manufacturer’s API, so 5 minutes works for me.
I’ve been trying for a while to integrate the measurements in the HA energy panel, but I can’t do it. I have also tried the tesla style card with the same result. It seems very intuitive to me to be able to see how the energy flows between the photovoltaic panels, the electrical network, the batteries and the consumption of the home.
I find the problem when configuring each section of the energy panel because the sensors I need do not appear, for example the instant measurement of photovoltaic production (esolar_nowpower).
I have realized that this happens because that sensor is device_class: power, when what the energy panel needs is device_class: energy.
I don’t know if there is any way to convert a sensor from one class to another.
In addition, in the section on batteries, you must indicate the sensor that marks the charge and the sensor that marks the discharge. The problem is that a single sensor measures this parameter and is complemented by another sensor that indicates whether it is charging or discharging.
I would appreciate if someone could help me to configure it correctly.