Add carbon dioxide device class to scd30 sensor schema. (#4547)

This commit is contained in:
Martin Murray 2023-03-12 16:16:48 -04:00 committed by Jesse Hills
parent cdeb6e750f
commit bf79a700b7
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -10,6 +10,7 @@ from esphome.const import (
CONF_CO2,
CONF_UPDATE_INTERVAL,
CONF_VALUE,
DEVICE_CLASS_CARBON_DIOXIDE,
DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_TEMPERATURE,
STATE_CLASS_MEASUREMENT,
@ -46,6 +47,7 @@ CONFIG_SCHEMA = (
unit_of_measurement=UNIT_PARTS_PER_MILLION,
icon=ICON_MOLECULE_CO2,
accuracy_decimals=0,
device_class=DEVICE_CLASS_CARBON_DIOXIDE,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema(