Add unit constant for revolutions per minute (#78752)

This commit is contained in:
epenet 2022-09-19 15:46:47 +02:00 committed by GitHub
parent e6970cb62f
commit 7cfc28e915
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 10 deletions

View file

@ -35,6 +35,7 @@ from homeassistant.const import (
PERCENTAGE,
POWER_WATT,
PRESSURE_HPA,
REVOLUTIONS_PER_MINUTE,
TEMP_CELSIUS,
TIME_DAYS,
TIME_HOURS,
@ -192,7 +193,7 @@ SENSOR_TYPES = {
ATTR_ACTUAL_SPEED: XiaomiMiioSensorDescription(
key=ATTR_ACTUAL_SPEED,
name="Actual speed",
native_unit_of_measurement="rpm",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
icon="mdi:fast-forward",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
@ -200,7 +201,7 @@ SENSOR_TYPES = {
ATTR_CONTROL_SPEED: XiaomiMiioSensorDescription(
key=ATTR_CONTROL_SPEED,
name="Control speed",
native_unit_of_measurement="rpm",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
icon="mdi:fast-forward",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
@ -208,7 +209,7 @@ SENSOR_TYPES = {
ATTR_FAVORITE_SPEED: XiaomiMiioSensorDescription(
key=ATTR_FAVORITE_SPEED,
name="Favorite speed",
native_unit_of_measurement="rpm",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
icon="mdi:fast-forward",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
@ -216,7 +217,7 @@ SENSOR_TYPES = {
ATTR_MOTOR_SPEED: XiaomiMiioSensorDescription(
key=ATTR_MOTOR_SPEED,
name="Motor speed",
native_unit_of_measurement="rpm",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
icon="mdi:fast-forward",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
@ -224,7 +225,7 @@ SENSOR_TYPES = {
ATTR_MOTOR2_SPEED: XiaomiMiioSensorDescription(
key=ATTR_MOTOR2_SPEED,
name="Second motor speed",
native_unit_of_measurement="rpm",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
icon="mdi:fast-forward",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,