Use REVOLUTIONS_PER_MINUTE constant in baf (#79986)
This commit is contained in:
parent
e7c614a825
commit
2538b9d269
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ from homeassistant.components.sensor import (
|
|||
SensorEntityDescription,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS
|
||||
from homeassistant.const import PERCENTAGE, REVOLUTIONS_PER_MINUTE, TEMP_CELSIUS
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -65,7 +65,7 @@ FAN_SENSORS = (
|
|||
BAFSensorDescription(
|
||||
key="current_rpm",
|
||||
name="Current RPM",
|
||||
native_unit_of_measurement="RPM",
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda device: cast(Optional[int], device.current_rpm),
|
||||
|
@ -73,7 +73,7 @@ FAN_SENSORS = (
|
|||
BAFSensorDescription(
|
||||
key="target_rpm",
|
||||
name="Target RPM",
|
||||
native_unit_of_measurement="RPM",
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda device: cast(Optional[int], device.target_rpm),
|
||||
|
|
Loading…
Add table
Reference in a new issue