Skip to content

Commit

Permalink
Add date device class (#55887)
Browse files Browse the repository at this point in the history
* Add date device class

home-assistant/architecture#610

* Add date device class to sensors device classes list
  • Loading branch information
scop committed Sep 7, 2021
1 parent 3aed58f commit 0684f8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions homeassistant/components/sensor/__init__.py
Expand Up @@ -18,6 +18,7 @@
DEVICE_CLASS_CO,
DEVICE_CLASS_CO2,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_DATE,
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_GAS,
DEVICE_CLASS_HUMIDITY,
Expand Down Expand Up @@ -69,6 +70,7 @@
DEVICE_CLASS_CO, # ppm (parts per million) Carbon Monoxide gas concentration
DEVICE_CLASS_CO2, # ppm (parts per million) Carbon Dioxide gas concentration
DEVICE_CLASS_CURRENT, # current (A)
DEVICE_CLASS_DATE, # date (ISO8601)
DEVICE_CLASS_ENERGY, # energy (kWh, Wh)
DEVICE_CLASS_HUMIDITY, # % of humidity in the air
DEVICE_CLASS_ILLUMINANCE, # current light level (lx/lm)
Expand Down
1 change: 1 addition & 0 deletions homeassistant/const.py
Expand Up @@ -237,6 +237,7 @@
DEVICE_CLASS_CO: Final = "carbon_monoxide"
DEVICE_CLASS_CO2: Final = "carbon_dioxide"
DEVICE_CLASS_CURRENT: Final = "current"
DEVICE_CLASS_DATE: Final = "date"
DEVICE_CLASS_ENERGY: Final = "energy"
DEVICE_CLASS_HUMIDITY: Final = "humidity"
DEVICE_CLASS_ILLUMINANCE: Final = "illuminance"
Expand Down

0 comments on commit 0684f8b

Please sign in to comment.