Shelly Pro 3EM current value to turn negative when export

I have Shelly Pro 3EM measuring from grid to house.
When i get solar surplus, active power shows export in negative W, but current shows allways positive A value, also apparent power shows allways positive VA value, export or import.
I need current to show positive and negative values for my evcc current control to calculate remaining available current to be used for ev charge correctly.
I have setup template to calculate A from W, but sometimes it shows wrong values, like 460A that is not possible, i think power factor value is to blame, but that is needed to get right value.

{{(states('sensor.shelly_pro_3_em_phase_a_active_power')|float/ states('sensor.shelly_pro_3_em_phase_a_voltage')|float / states('sensor.shelly_pro_3_em_phase_a_power_factor')|float)|round(2)}}

Would it be possible to convert current value sensor.shelly_pro_3_em_phase_a_current to negative when sensor.shelly_pro_3_em_phase_a_active_power is negative, with template etc?

Or is there some else workaround, i didnt find option for negative A value in shelly UI.