Use UnitOfVolume in integrations (#83646)
This commit is contained in:
parent
68efa37bff
commit
456c5515c8
17 changed files with 57 additions and 64 deletions
|
@ -13,7 +13,7 @@ from homeassistant.const import (
|
|||
CONF_DEVICE,
|
||||
ENERGY_KILO_WATT_HOUR,
|
||||
POWER_WATT,
|
||||
VOLUME_CUBIC_METERS,
|
||||
UnitOfVolume,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
|
@ -98,7 +98,7 @@ class YoulessBaseSensor(CoordinatorEntity, SensorEntity):
|
|||
class GasSensor(YoulessBaseSensor):
|
||||
"""The Youless gas sensor."""
|
||||
|
||||
_attr_native_unit_of_measurement = VOLUME_CUBIC_METERS
|
||||
_attr_native_unit_of_measurement = UnitOfVolume.CUBIC_METERS
|
||||
_attr_device_class = SensorDeviceClass.GAS
|
||||
_attr_state_class = SensorStateClass.TOTAL_INCREASING
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue