mirror of
https://github.com/esphome/esphome.git
synced 2024-11-12 18:27:46 +01:00
Update sensor device classes from HA (#1825)
This commit is contained in:
parent
a33bb32874
commit
e3c27a483c
2 changed files with 7 additions and 1 deletions
|
@ -33,6 +33,8 @@ from esphome.const import (
|
|||
ICON_EMPTY,
|
||||
DEVICE_CLASS_EMPTY,
|
||||
DEVICE_CLASS_BATTERY,
|
||||
DEVICE_CLASS_CARBON_MONOXIDE,
|
||||
DEVICE_CLASS_CARBON_DIOXIDE,
|
||||
DEVICE_CLASS_CURRENT,
|
||||
DEVICE_CLASS_ENERGY,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
|
@ -52,16 +54,18 @@ CODEOWNERS = ["@esphome/core"]
|
|||
DEVICE_CLASSES = [
|
||||
DEVICE_CLASS_EMPTY,
|
||||
DEVICE_CLASS_BATTERY,
|
||||
DEVICE_CLASS_CARBON_MONOXIDE,
|
||||
DEVICE_CLASS_CARBON_DIOXIDE,
|
||||
DEVICE_CLASS_CURRENT,
|
||||
DEVICE_CLASS_ENERGY,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_ILLUMINANCE,
|
||||
DEVICE_CLASS_SIGNAL_STRENGTH,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
DEVICE_CLASS_TIMESTAMP,
|
||||
DEVICE_CLASS_POWER,
|
||||
DEVICE_CLASS_POWER_FACTOR,
|
||||
DEVICE_CLASS_PRESSURE,
|
||||
DEVICE_CLASS_TIMESTAMP,
|
||||
DEVICE_CLASS_VOLTAGE,
|
||||
]
|
||||
|
||||
|
|
|
@ -746,6 +746,8 @@ DEVICE_CLASS_EMPTY = ""
|
|||
DEVICE_CLASS_BATTERY = "battery"
|
||||
DEVICE_CLASS_POWER = "power"
|
||||
# device classes of sensor component
|
||||
DEVICE_CLASS_CARBON_MONOXIDE = "carbon_monoxide"
|
||||
DEVICE_CLASS_CARBON_DIOXIDE = "carbon_dioxide"
|
||||
DEVICE_CLASS_CURRENT = "current"
|
||||
DEVICE_CLASS_ENERGY = "energy"
|
||||
DEVICE_CLASS_HUMIDITY = "humidity"
|
||||
|
|
Loading…
Reference in a new issue