1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-15 09:42:19 +01:00

Add device classes new in HA 2021.9 (#2248)

This commit is contained in:
Oxan van Leeuwen
2021-09-07 00:12:26 +02:00
committed by GitHub
parent 2d91e6b977
commit d9cb64b893
15 changed files with 97 additions and 17 deletions

View File

@@ -7,6 +7,7 @@ from esphome.const import (
CONF_CO2,
CONF_ID,
ICON_MOLECULE_CO2,
DEVICE_CLASS_CARBON_DIOXIDE,
STATE_CLASS_MEASUREMENT,
UNIT_PARTS_PER_MILLION,
)
@@ -41,6 +42,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,
),
}