Use SensorDeviceClass.VOLUME in components (#79253)
This commit is contained in:
parent
0e764b57c2
commit
fab3ee90b2
8 changed files with 23 additions and 2 deletions
|
@ -8,7 +8,11 @@ from pysuez import SuezClient
|
|||
from pysuez.client import PySuezError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.components.sensor import (
|
||||
PLATFORM_SCHEMA,
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
)
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, VOLUME_LITERS
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
@ -63,6 +67,7 @@ class SuezSensor(SensorEntity):
|
|||
_attr_name = NAME
|
||||
_attr_icon = ICON
|
||||
_attr_native_unit_of_measurement = VOLUME_LITERS
|
||||
_attr_device_class = SensorDeviceClass.VOLUME
|
||||
|
||||
def __init__(self, client):
|
||||
"""Initialize the data object."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue