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
|
@ -25,12 +25,12 @@ from homeassistant.const import (
|
|||
MASS_KILOGRAMS,
|
||||
PERCENTAGE,
|
||||
POWER_WATT,
|
||||
SOUND_PRESSURE_DB,
|
||||
TEMP_CELSIUS,
|
||||
TEMP_FAHRENHEIT,
|
||||
VOLUME_CUBIC_METERS,
|
||||
Platform,
|
||||
UnitOfApparentPower,
|
||||
UnitOfSoundPressure,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -134,8 +134,8 @@ SENSORS: dict[str, SensorEntityDescription] = {
|
|||
),
|
||||
"V_LEVEL_S_SOUND": SensorEntityDescription(
|
||||
key="V_LEVEL_S_SOUND",
|
||||
native_unit_of_measurement=SOUND_PRESSURE_DB,
|
||||
icon="mdi:volume-high",
|
||||
native_unit_of_measurement=UnitOfSoundPressure.DECIBEL,
|
||||
device_class=SensorDeviceClass.SOUND_PRESSURE,
|
||||
),
|
||||
"V_LEVEL_S_VIBRATION": SensorEntityDescription(
|
||||
key="V_LEVEL_S_VIBRATION",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue