Use SoundPressure unit and device class in integrations (#83585)
* Use SoundPressure unit and device class in integrations * Adjust tests
This commit is contained in:
parent
558dceac42
commit
061cef1a5e
4 changed files with 10 additions and 9 deletions
|
@ -31,9 +31,9 @@ from homeassistant.const import (
|
|||
POWER_WATT,
|
||||
PRESSURE_HPA,
|
||||
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
SOUND_PRESSURE_DB,
|
||||
TEMP_CELSIUS,
|
||||
Platform,
|
||||
UnitOfSoundPressure,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
|
@ -330,7 +330,8 @@ SIMPLE_SENSOR: dict[str, HomeKitSensorEntityDescription] = {
|
|||
key=CharacteristicsTypes.VENDOR_NETATMO_NOISE,
|
||||
name="Noise",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=SOUND_PRESSURE_DB,
|
||||
native_unit_of_measurement=UnitOfSoundPressure.DECIBEL,
|
||||
device_class=SensorDeviceClass.SOUND_PRESSURE,
|
||||
),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue