mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +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.components.sensor import SensorEntity
|
||||||
from homeassistant.config_entries import ConfigEntry
|
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.core import HomeAssistant, callback
|
||||||
from homeassistant.exceptions import PlatformNotReady
|
from homeassistant.exceptions import PlatformNotReady
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
@ -74,6 +80,8 @@ async def async_setup_entry(
|
|||||||
class TwenteMilieuSensor(SensorEntity):
|
class TwenteMilieuSensor(SensorEntity):
|
||||||
"""Defines a Twente Milieu sensor."""
|
"""Defines a Twente Milieu sensor."""
|
||||||
|
|
||||||
|
_attr_device_class = DEVICE_CLASS_DATE
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
twentemilieu: TwenteMilieu,
|
twentemilieu: TwenteMilieu,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user