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

@ -41,6 +41,7 @@ from homeassistant.const import (
ENERGY_KILO_WATT_HOUR,
PERCENTAGE,
POWER_WATT,
REVOLUTIONS_PER_MINUTE,
TEMP_CELSIUS,
TIME_DAYS,
VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR,
@ -159,7 +160,7 @@ SENSOR_TYPES = (
key=ATTR_SUPPLY_FAN_SPEED,
state_class=SensorStateClass.MEASUREMENT,
name="Supply fan speed",
native_unit_of_measurement="rpm",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
icon="mdi:fan-plus",
sensor_id=SENSOR_FAN_SUPPLY_SPEED,
),
@ -175,7 +176,7 @@ SENSOR_TYPES = (
key=ATTR_EXHAUST_FAN_SPEED,
state_class=SensorStateClass.MEASUREMENT,
name="Exhaust fan speed",
native_unit_of_measurement="rpm",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
icon="mdi:fan-minus",
sensor_id=SENSOR_FAN_EXHAUST_SPEED,
),