There are two problems with power factors right now.
Power factor is defined as the ratio of real power to apparent power. It is calculated as a cos(φ) from power vectors and it gives a numeric value between -1.0 and 1.0. It does not have any unit (more about that later).
In HA, all sensors using
power_factor class are expected to report percent which is not a right power factor measurement.
In the core code there is only Shelly integration that uses this device class and does extra calculation for that. There could be other community modules that use power factor sensor.
I suggest using values between -1.0 and 1.0 for power factor. This also makes calculations simpler
I would like to raise a PR to change that if there is no good rationale to hold the current situation. This will be a breaking change but as much as I have looked around different public configurations, it is very rarely used sensor anyway.
I have is also one WTH with this measurement: because it is a unitless value, Lovelace doesn’t draw a history graph for that. I actually don’t know how to properly “fix” that. For myself I added a
unit_of_measurement: "cos(φ)" to get the graph but this is not 100% correct because power factor doesn’t have a unit and “cos(φ)” is not a unit but a calculation formula.