diff --git a/homeassistant/components/risco/binary_sensor.py b/homeassistant/components/risco/binary_sensor.py index cc93d7c11d4..3cfa8ba8a9d 100644 --- a/homeassistant/components/risco/binary_sensor.py +++ b/homeassistant/components/risco/binary_sensor.py @@ -1,6 +1,6 @@ """Support for Risco alarm zones.""" from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_MOTION, + BinarySensorDeviceClass, BinarySensorEntity, ) from homeassistant.helpers import entity_platform @@ -72,8 +72,8 @@ class RiscoBinarySensor(BinarySensorEntity, RiscoEntity): @property def device_class(self): - """Return the class of this sensor, from DEVICE_CLASSES.""" - return DEVICE_CLASS_MOTION + """Return the class of this sensor, from BinarySensorDeviceClass.""" + return BinarySensorDeviceClass.MOTION async def _bypass(self, bypass): alarm = await self._risco.bypass_zone(self._zone_id, bypass) diff --git a/homeassistant/components/risco/sensor.py b/homeassistant/components/risco/sensor.py index 0068e8c0f04..fdb7bbc32b4 100644 --- a/homeassistant/components/risco/sensor.py +++ b/homeassistant/components/risco/sensor.py @@ -1,7 +1,6 @@ """Sensor for Risco Events.""" from homeassistant.components.binary_sensor import DOMAIN as BS_DOMAIN -from homeassistant.components.sensor import SensorEntity -from homeassistant.const import DEVICE_CLASS_TIMESTAMP +from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import DOMAIN, EVENTS_COORDINATOR @@ -116,4 +115,4 @@ class RiscoSensor(CoordinatorEntity, SensorEntity): @property def device_class(self): """Device class of sensor.""" - return DEVICE_CLASS_TIMESTAMP + return SensorDeviceClass.TIMESTAMP