Use UnitOfPressure in integrations (#84230)
This commit is contained in:
parent
0ccac69ce1
commit
f988a1164d
27 changed files with 72 additions and 68 deletions
|
@ -10,10 +10,10 @@ from homeassistant.components.sensor import (
|
|||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
PERCENTAGE,
|
||||
PRESSURE_BAR,
|
||||
TEMP_CELSIUS,
|
||||
UnitOfEnergy,
|
||||
UnitOfPower,
|
||||
UnitOfPressure,
|
||||
UnitOfVolume,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -280,7 +280,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
SensorEntityDescription(
|
||||
key="water_pressure",
|
||||
name="Water pressure",
|
||||
native_unit_of_measurement=PRESSURE_BAR,
|
||||
native_unit_of_measurement=UnitOfPressure.BAR,
|
||||
device_class=SensorDeviceClass.PRESSURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue