Use UnitOfVolumeFlowRate in integrations (#84348)

This commit is contained in:
epenet
2022-12-21 11:00:24 +01:00
committed by GitHub
parent 9a488cf250
commit 2f45e6c2ae
8 changed files with 23 additions and 26 deletions

View File

@@ -25,7 +25,6 @@ from homeassistant.const import (
LIGHT_LUX,
PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfEnergy,
@@ -37,6 +36,7 @@ from homeassistant.const import (
UnitOfTemperature,
UnitOfTime,
UnitOfVolume,
UnitOfVolumeFlowRate,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import EntityCategory
@@ -280,7 +280,7 @@ SENSOR_DESCRIPTIONS = {
Units.VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR,
): SensorEntityDescription(
key=f"{BTHomeSensorDeviceClass.VOLUME_FLOW_RATE}_{Units.VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR}",
native_unit_of_measurement=VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR,
native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
state_class=SensorStateClass.MEASUREMENT,
),
}