Use enums in rova (#62044)

pull/62088/head
Robert Hillis 2021-12-16 08:42:43 -05:00 committed by GitHub
parent 093202f138
commit fa522fc504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

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