Use enums in rova (#62044)
parent
093202f138
commit
fa522fc504
|
@ -10,14 +10,11 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.components.sensor import (
|
||||
PLATFORM_SCHEMA,
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
CONF_MONITORED_CONDITIONS,
|
||||
CONF_NAME,
|
||||
DEVICE_CLASS_TIMESTAMP,
|
||||
)
|
||||
from homeassistant.const import CONF_MONITORED_CONDITIONS, CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.util import Throttle
|
||||
from homeassistant.util.dt import get_time_zone, now
|
||||
|
@ -110,7 +107,7 @@ class RovaSensor(SensorEntity):
|
|||
self.data_service = data_service
|
||||
|
||||
self._attr_name = f"{platform_name}_{description.name}"
|
||||
self._attr_device_class = DEVICE_CLASS_TIMESTAMP
|
||||
self._attr_device_class = SensorDeviceClass.TIMESTAMP
|
||||
|
||||
def update(self):
|
||||
"""Get the latest data from the sensor and update the state."""
|
||||
|
|
Loading…
Reference in New Issue