Added deviceclass timestamp constant (#18652)

* Added deviceclass timestamp

* added device class timestamp to sensor

* fixed comment
This commit is contained in:
Eliseo Martelli authored and Paulus Schoutsen committed 2018-11-23 14:51:26 +01:00
1 parent c0cf29aba9
commit 1c17b885db
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -14,7 +14,7 @@ from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
from homeassistant.const import (
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__)
@@ -28,6 +28,7 @@ DEVICE_CLASSES = [
DEVICE_CLASS_HUMIDITY, # % of humidity in the air
DEVICE_CLASS_ILLUMINANCE, # current light level (lx/lm)
DEVICE_CLASS_TEMPERATURE, # temperature (C/F)
DEVICE_CLASS_TIMESTAMP, # timestamp (ISO8601)
DEVICE_CLASS_PRESSURE, # pressure (hPa/mbar)
]
+1
View File
@@ -177,6 +177,7 @@ DEVICE_CLASS_BATTERY = 'battery'
DEVICE_CLASS_HUMIDITY = 'humidity'
DEVICE_CLASS_ILLUMINANCE = 'illuminance'
DEVICE_CLASS_TEMPERATURE = 'temperature'
DEVICE_CLASS_TIMESTAMP = 'timestamp'
DEVICE_CLASS_PRESSURE = 'pressure'
# #### STATES ####