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 GitHub
parent 3cfcb93d70
commit 2a42a58ec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,
),