mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Use Volume Flow Rate device class in DROP connect (#113528)
This commit is contained in:
parent
5b5ff92a05
commit
b6a06f49b7
@ -20,6 +20,7 @@ from homeassistant.const import (
|
||||
UnitOfPressure,
|
||||
UnitOfTemperature,
|
||||
UnitOfVolume,
|
||||
UnitOfVolumeFlowRate,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
@ -70,7 +71,8 @@ SENSORS: list[DROPSensorEntityDescription] = [
|
||||
DROPSensorEntityDescription(
|
||||
key=CURRENT_FLOW_RATE,
|
||||
translation_key=CURRENT_FLOW_RATE,
|
||||
native_unit_of_measurement="gpm",
|
||||
device_class=SensorDeviceClass.VOLUME_FLOW_RATE,
|
||||
native_unit_of_measurement=UnitOfVolumeFlowRate.GALLONS_PER_MINUTE,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda device: device.drop_api.current_flow_rate(),
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -78,7 +80,8 @@ SENSORS: list[DROPSensorEntityDescription] = [
|
||||
DROPSensorEntityDescription(
|
||||
key=PEAK_FLOW_RATE,
|
||||
translation_key=PEAK_FLOW_RATE,
|
||||
native_unit_of_measurement="gpm",
|
||||
device_class=SensorDeviceClass.VOLUME_FLOW_RATE,
|
||||
native_unit_of_measurement=UnitOfVolumeFlowRate.GALLONS_PER_MINUTE,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda device: device.drop_api.peak_flow_rate(),
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user