Restore negative values for shelly power factors (#81689)

fixes undefined
This commit is contained in:
Simone Chemelli 2022-11-07 01:16:58 +01:00 committed by Franck Nijhof
parent efb984aa83
commit 34ae83b4e2
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -140,7 +140,7 @@ SENSORS: Final = {
key="emeter|powerFactor",
name="Power Factor",
native_unit_of_measurement=PERCENTAGE,
value=lambda value: abs(round(value * 100, 1)),
value=lambda value: round(value * 100, 1),
device_class=SensorDeviceClass.POWER_FACTOR,
state_class=SensorStateClass.MEASUREMENT,
),