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

@ -25,7 +25,6 @@ from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
LIGHT_LUX,
PERCENTAGE,
PRESSURE_HPA,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
TEMP_CELSIUS,
Platform,
@ -33,6 +32,7 @@ from homeassistant.const import (
UnitOfElectricPotential,
UnitOfEnergy,
UnitOfPower,
UnitOfPressure,
UnitOfSoundPressure,
)
from homeassistant.core import HomeAssistant, callback
@ -216,7 +216,7 @@ SIMPLE_SENSOR: dict[str, HomeKitSensorEntityDescription] = {
name="Air Pressure",
device_class=SensorDeviceClass.PRESSURE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=PRESSURE_HPA,
native_unit_of_measurement=UnitOfPressure.HPA,
),
CharacteristicsTypes.VENDOR_VOCOLINC_OUTLET_ENERGY: HomeKitSensorEntityDescription(
key=CharacteristicsTypes.VENDOR_VOCOLINC_OUTLET_ENERGY,