mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Added deviceclass timestamp constant (#18652)
* Added deviceclass timestamp * added device class timestamp to sensor * fixed comment
This commit is contained in:
parent
c0cf29aba9
commit
1c17b885db
@ -14,7 +14,7 @@ from homeassistant.helpers.entity_component import EntityComponent
|
|||||||
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
|
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
DEVICE_CLASS_BATTERY, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE,
|
DEVICE_CLASS_BATTERY, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE,
|
||||||
DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_PRESSURE)
|
DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_TIMESTAMP, DEVICE_CLASS_PRESSURE)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ DEVICE_CLASSES = [
|
|||||||
DEVICE_CLASS_HUMIDITY, # % of humidity in the air
|
DEVICE_CLASS_HUMIDITY, # % of humidity in the air
|
||||||
DEVICE_CLASS_ILLUMINANCE, # current light level (lx/lm)
|
DEVICE_CLASS_ILLUMINANCE, # current light level (lx/lm)
|
||||||
DEVICE_CLASS_TEMPERATURE, # temperature (C/F)
|
DEVICE_CLASS_TEMPERATURE, # temperature (C/F)
|
||||||
|
DEVICE_CLASS_TIMESTAMP, # timestamp (ISO8601)
|
||||||
DEVICE_CLASS_PRESSURE, # pressure (hPa/mbar)
|
DEVICE_CLASS_PRESSURE, # pressure (hPa/mbar)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -177,6 +177,7 @@ DEVICE_CLASS_BATTERY = 'battery'
|
|||||||
DEVICE_CLASS_HUMIDITY = 'humidity'
|
DEVICE_CLASS_HUMIDITY = 'humidity'
|
||||||
DEVICE_CLASS_ILLUMINANCE = 'illuminance'
|
DEVICE_CLASS_ILLUMINANCE = 'illuminance'
|
||||||
DEVICE_CLASS_TEMPERATURE = 'temperature'
|
DEVICE_CLASS_TEMPERATURE = 'temperature'
|
||||||
|
DEVICE_CLASS_TIMESTAMP = 'timestamp'
|
||||||
DEVICE_CLASS_PRESSURE = 'pressure'
|
DEVICE_CLASS_PRESSURE = 'pressure'
|
||||||
|
|
||||||
# #### STATES ####
|
# #### STATES ####
|
||||||
|
Loading…
x
Reference in New Issue
Block a user