mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Add date device_class to Twente Milieu sensors (#56579)
This commit is contained in:
parent
fed5f5e3b9
commit
750a1b84ad
@ -12,7 +12,13 @@ from twentemilieu import (
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_IDENTIFIERS, ATTR_MANUFACTURER, ATTR_NAME, CONF_ID
|
||||
from homeassistant.const import (
|
||||
ATTR_IDENTIFIERS,
|
||||
ATTR_MANUFACTURER,
|
||||
ATTR_NAME,
|
||||
CONF_ID,
|
||||
DEVICE_CLASS_DATE,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
@ -74,6 +80,8 @@ async def async_setup_entry(
|
||||
class TwenteMilieuSensor(SensorEntity):
|
||||
"""Defines a Twente Milieu sensor."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_DATE
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
twentemilieu: TwenteMilieu,
|
||||
|
Loading…
x
Reference in New Issue
Block a user