Calculation of Current (Ampere) in template sensor?

hi,
my shelly EM does only supports Voltage(V), Power (W) and Powerfactor (%), but unfortunately not Current (A).

so i want to create a template senor for it.

i have read, that for calculation for AC, i have to consider powerfactor as well, and i can´t simply use “current=power/Voltage”
but all formulas i has found the powerfactor is calculated with cosφ (I = P / (U x cosφ))…but the shelly only give me %?

how do i calculate current with the given shelly infos correctly? and how is the template syntax for that?

thanx in advance
br
Frank

I don’t own a Shelly EM, so cannot be 100% sure, but I think that the power factor in this case is:

Power factor = 0% → cosφ = 0
Power factor = 100% → cosφ = 1

So just divide the Power factor value by 100 and you should be good.