From 158ff601b6511169f0a1d7d36627bc8c0f25660e Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 14 Dec 2021 22:11:54 +0100 Subject: [PATCH] Use SensorDeviceClass in islamic_prayer_times (#61824) --- homeassistant/components/islamic_prayer_times/sensor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/islamic_prayer_times/sensor.py b/homeassistant/components/islamic_prayer_times/sensor.py index 38a95fb803b..916d571fd70 100644 --- a/homeassistant/components/islamic_prayer_times/sensor.py +++ b/homeassistant/components/islamic_prayer_times/sensor.py @@ -1,7 +1,6 @@ """Platform to retrieve Islamic prayer times information for Home Assistant.""" -from homeassistant.components.sensor import SensorEntity -from homeassistant.const import DEVICE_CLASS_TIMESTAMP +from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.helpers.dispatcher import async_dispatcher_connect import homeassistant.util.dt as dt_util @@ -23,7 +22,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): class IslamicPrayerTimeSensor(SensorEntity): """Representation of an Islamic prayer time sensor.""" - _attr_device_class = DEVICE_CLASS_TIMESTAMP + _attr_device_class = SensorDeviceClass.TIMESTAMP _attr_icon = PRAYER_TIMES_ICON _attr_should_poll = False