mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 16:38:16 +01:00
Add carbon dioxide device class to scd30 sensor schema. (#4547)
This commit is contained in:
parent
29113808ee
commit
5a56644702
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,7 @@ from esphome.const import (
|
||||||
CONF_CO2,
|
CONF_CO2,
|
||||||
CONF_UPDATE_INTERVAL,
|
CONF_UPDATE_INTERVAL,
|
||||||
CONF_VALUE,
|
CONF_VALUE,
|
||||||
|
DEVICE_CLASS_CARBON_DIOXIDE,
|
||||||
DEVICE_CLASS_HUMIDITY,
|
DEVICE_CLASS_HUMIDITY,
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
DEVICE_CLASS_TEMPERATURE,
|
||||||
STATE_CLASS_MEASUREMENT,
|
STATE_CLASS_MEASUREMENT,
|
||||||
|
@ -46,6 +47,7 @@ CONFIG_SCHEMA = (
|
||||||
unit_of_measurement=UNIT_PARTS_PER_MILLION,
|
unit_of_measurement=UNIT_PARTS_PER_MILLION,
|
||||||
icon=ICON_MOLECULE_CO2,
|
icon=ICON_MOLECULE_CO2,
|
||||||
accuracy_decimals=0,
|
accuracy_decimals=0,
|
||||||
|
device_class=DEVICE_CLASS_CARBON_DIOXIDE,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema(
|
cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema(
|
||||||
|
|
Loading…
Reference in a new issue