Use SensorDeviceClass in islamic_prayer_times (#61824)

This commit is contained in:
epenet 2021-12-14 22:11:54 +01:00 committed by GitHub
parent 12349eb70e
commit 158ff601b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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