Skip to content

Correct power factor range (and unit) #469

@Cougar

Description

@Cougar

Context

Power factor is a ratio of real power to apparent power. The value is in range -1.0 to 1.0. Right now the HA describes it with a percent (percent from what?).

The current range and unit idea came from discussion in #397. There was an issue that numbers need a unit (to display graphs correct way).

I have looked a lot of public configurations and wrote that in forum.

I have found from feedback and from configurations that there are very few users who care about power factor and they usually use correct range between -1.0 and 1.0. The workaround for a "percent" unit is to replace it with invented units like "cos(φ)" but the common one is to use a space as a unit (empty unit) and then it looks correct in Lovelace graphs too.

There are only two integrations in core where power factor is used: Shelly and Keba. Power factor values from Keba sensor are already in correct range.

Proposal

  • Change power factor range from -100…100 to -1…1.
  • Use " " (space) as a unit (as long as unit is required for Lovelace graphs).

Consequences

This will be a breaking change. Users who has been used with percent, need to multiply the new value with 100. Users who like to see correct numbers and divided the value with 100 before (most likely only in case of Shelly), have to remove this division.

Shelly is the only integration that gives power factor in range -100…100 (or is it 0…100?) and needs to be changed in core code. I have a PR ready for that and for documentation change.

All other sensors that I have searched (like Tasmota, some Z-wave power sensors, Keba, OpenEnergyMonitor based projects) return correct power factor.

Only few exceptions are systems which don't support floating numbers in their wire protocols and then the user library or application to divide the number with 100 or 1000 (depending on the resolution).

Based on my research, it is very unlikely that anyone run any automation based on power factor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions