Use REVOLUTIONS_PER_MINUTE constant in glances (#79988)

This commit is contained in:
epenet 2022-10-11 14:56:35 +02:00 committed by GitHub
parent b1dd646ed8
commit b81c7d7f8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,7 @@ from homeassistant.const import (
DATA_GIBIBYTES,
DATA_MEBIBYTES,
PERCENTAGE,
REVOLUTIONS_PER_MINUTE,
STATE_UNAVAILABLE,
TEMP_CELSIUS,
Platform,
@ -174,7 +175,7 @@ SENSOR_TYPES: tuple[GlancesSensorEntityDescription, ...] = (
key="fan_speed",
type="sensors",
name_suffix="Fan speed",
native_unit_of_measurement="RPM",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
icon="mdi:fan",
state_class=SensorStateClass.MEASUREMENT,
),