ekmmeters.py
def calcPF(pf):
        """ Simple wrap to calc legacy PF value

        Args:
            pf: meter power factor reading

        Returns:
            int: legacy push pf
        """
        pf_y = pf[:1]
        pf_x = pf[1:]
        result = 100
        if pf_y == CosTheta.CapacitiveLead:
            result = 200 - int(pf_x)
        elif pf_y == CosTheta.InductiveLag:
            result = int(pf_x)

        return result
def calcPF(pf):
        pf_y = pf[:1]
        pf_x = pf[1:]
        result = 100
        if pf_y == CosTheta.CapacitiveLead:
            result = 200 - int(pf_x)
        elif pf_y == CosTheta.InductiveLag:
            result = int(pf_x)

        return result
def calcPF ( pf ) : pf_y = pf [ : 1 ] pf_x = pf [ 1 : ] result = 100 if pf_y == CosTheta . CapacitiveLead : result = 200 - int ( pf_x ) elif pf_y == CosTheta . InductiveLag : result = int ( pf_x ) return result
Simple wrap to calc legacy PF value

        Args:
            pf: meter power factor reading

        Returns:
            int: legacy push pf
Simple wrap to calc legacy PF value