Use UnitOfPressure in integrations (#84230)

This commit is contained in:
epenet 2022-12-19 21:41:46 +01:00 committed by GitHub
parent 0ccac69ce1
commit f988a1164d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 72 additions and 68 deletions

View file

@ -15,9 +15,9 @@ from homeassistant.const import (
CONCENTRATION_PARTS_PER_BILLION,
CONCENTRATION_PARTS_PER_MILLION,
PERCENTAGE,
PRESSURE_MBAR,
SIGNAL_STRENGTH_DECIBELS,
TEMP_CELSIUS,
UnitOfPressure,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo, EntityCategory
@ -51,7 +51,7 @@ SENSORS: dict[str, SensorEntityDescription] = {
"pressure": SensorEntityDescription(
key="pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=PRESSURE_MBAR,
native_unit_of_measurement=UnitOfPressure.MBAR,
name="Pressure",
),
"battery": SensorEntityDescription(