Add Gas device class to DSMR component (#2169)

This commit is contained in:
Franck Nijhof 2021-08-17 11:43:51 +02:00 committed by GitHub
parent 607e1f823d
commit ebabf0e7d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,7 @@ from esphome.const import (
DEVICE_CLASS_CURRENT, DEVICE_CLASS_CURRENT,
DEVICE_CLASS_EMPTY, DEVICE_CLASS_EMPTY,
DEVICE_CLASS_ENERGY, DEVICE_CLASS_ENERGY,
DEVICE_CLASS_GAS,
DEVICE_CLASS_POWER, DEVICE_CLASS_POWER,
DEVICE_CLASS_VOLTAGE, DEVICE_CLASS_VOLTAGE,
ICON_EMPTY, ICON_EMPTY,
@ -178,7 +179,7 @@ CONFIG_SCHEMA = cv.Schema(
"", "",
ICON_EMPTY, ICON_EMPTY,
3, 3,
DEVICE_CLASS_EMPTY, DEVICE_CLASS_GAS,
STATE_CLASS_MEASUREMENT, STATE_CLASS_MEASUREMENT,
LAST_RESET_TYPE_NEVER, LAST_RESET_TYPE_NEVER,
), ),
@ -186,7 +187,7 @@ CONFIG_SCHEMA = cv.Schema(
"", "",
ICON_EMPTY, ICON_EMPTY,
3, 3,
DEVICE_CLASS_EMPTY, DEVICE_CLASS_GAS,
STATE_CLASS_MEASUREMENT, STATE_CLASS_MEASUREMENT,
LAST_RESET_TYPE_NEVER, LAST_RESET_TYPE_NEVER,
), ),

View File

@ -40,6 +40,7 @@ from esphome.const import (
DEVICE_CLASS_CARBON_DIOXIDE, DEVICE_CLASS_CARBON_DIOXIDE,
DEVICE_CLASS_CURRENT, DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY, DEVICE_CLASS_ENERGY,
DEVICE_CLASS_GAS,
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_ILLUMINANCE,
DEVICE_CLASS_MONETARY, DEVICE_CLASS_MONETARY,
@ -62,6 +63,7 @@ DEVICE_CLASSES = [
DEVICE_CLASS_CARBON_DIOXIDE, DEVICE_CLASS_CARBON_DIOXIDE,
DEVICE_CLASS_CURRENT, DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY, DEVICE_CLASS_ENERGY,
DEVICE_CLASS_GAS,
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_ILLUMINANCE,
DEVICE_CLASS_MONETARY, DEVICE_CLASS_MONETARY,