It’s simple math. As you have already your active power (kW) from your domestic electricity meter via mqtt in HA and you also have the apparent power (kVA) from your ct-clamp/coil together with a voltage meter (*) you can actually simply calculate the reactive power (kVAR) to get to know the power factor
Active power = apparent power - reactive power
*In case you don’t measure the voltage continuously don’t try a fixed (imaginary) value as this will simply not work out…
Our Last week AC voltage as an example
You want your ct (CURRENT transformer) to tell you voltage, power, frequency and power factor with the help of software? You should throw a patent on this
You for sure will find sources that explain it in an easier way for you. But really take the time to get this knowledge! You will have no chances in achieve what you want without knowing the basics. And don’t blame yourself - many people think that a current transformer (ct) will tell them the real power usage in an AC system (with PF not 1) but that’s just not the case (and something I write here like every 3 months )