mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
Use AQI device class (#6376)
This commit is contained in:
parent
6e8760eba0
commit
5d96b5c52b
1 changed files with 3 additions and 4 deletions
|
@ -14,13 +14,12 @@ from esphome.const import (
|
||||||
CONF_PM_4_0,
|
CONF_PM_4_0,
|
||||||
CONF_STORE_BASELINE,
|
CONF_STORE_BASELINE,
|
||||||
CONF_TEMPERATURE,
|
CONF_TEMPERATURE,
|
||||||
|
DEVICE_CLASS_AQI,
|
||||||
DEVICE_CLASS_HUMIDITY,
|
DEVICE_CLASS_HUMIDITY,
|
||||||
DEVICE_CLASS_NITROUS_OXIDE,
|
|
||||||
DEVICE_CLASS_PM1,
|
DEVICE_CLASS_PM1,
|
||||||
DEVICE_CLASS_PM10,
|
DEVICE_CLASS_PM10,
|
||||||
DEVICE_CLASS_PM25,
|
DEVICE_CLASS_PM25,
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
DEVICE_CLASS_TEMPERATURE,
|
||||||
DEVICE_CLASS_VOLATILE_ORGANIC_COMPOUNDS,
|
|
||||||
ICON_CHEMICAL_WEAPON,
|
ICON_CHEMICAL_WEAPON,
|
||||||
ICON_RADIATOR,
|
ICON_RADIATOR,
|
||||||
ICON_THERMOMETER,
|
ICON_THERMOMETER,
|
||||||
|
@ -132,13 +131,13 @@ CONFIG_SCHEMA = (
|
||||||
cv.Optional(CONF_VOC): sensor.sensor_schema(
|
cv.Optional(CONF_VOC): sensor.sensor_schema(
|
||||||
icon=ICON_RADIATOR,
|
icon=ICON_RADIATOR,
|
||||||
accuracy_decimals=0,
|
accuracy_decimals=0,
|
||||||
device_class=DEVICE_CLASS_VOLATILE_ORGANIC_COMPOUNDS,
|
device_class=DEVICE_CLASS_AQI,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
).extend(GAS_SENSOR),
|
).extend(GAS_SENSOR),
|
||||||
cv.Optional(CONF_NOX): sensor.sensor_schema(
|
cv.Optional(CONF_NOX): sensor.sensor_schema(
|
||||||
icon=ICON_RADIATOR,
|
icon=ICON_RADIATOR,
|
||||||
accuracy_decimals=0,
|
accuracy_decimals=0,
|
||||||
device_class=DEVICE_CLASS_NITROUS_OXIDE,
|
device_class=DEVICE_CLASS_AQI,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
).extend(GAS_SENSOR),
|
).extend(GAS_SENSOR),
|
||||||
cv.Optional(CONF_STORE_BASELINE, default=True): cv.boolean,
|
cv.Optional(CONF_STORE_BASELINE, default=True): cv.boolean,
|
||||||
|
|
Loading…
Reference in a new issue