Use UnitOfVolume in integrations (#83646)

This commit is contained in:
epenet 2022-12-10 12:43:13 +01:00 committed by GitHub
parent 68efa37bff
commit 456c5515c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 57 additions and 64 deletions

View file

@ -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