Add Gas device class to DSMR Reader (#54748)

This commit is contained in:
Franck Nijhof 2021-08-18 10:14:03 +02:00 committed by GitHub
parent e1926caeb9
commit 73d03bdf1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ from homeassistant.const import (
CURRENCY_EURO,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_GAS,
DEVICE_CLASS_POWER,
DEVICE_CLASS_TIMESTAMP,
DEVICE_CLASS_VOLTAGE,
@ -201,14 +202,14 @@ SENSORS: tuple[DSMRReaderSensorEntityDescription, ...] = (
DSMRReaderSensorEntityDescription(
key="dsmr/consumption/gas/delivered",
name="Gas usage",
icon="mdi:fire",
device_class=DEVICE_CLASS_GAS,
native_unit_of_measurement=VOLUME_CUBIC_METERS,
state_class=STATE_CLASS_TOTAL_INCREASING,
),
DSMRReaderSensorEntityDescription(
key="dsmr/consumption/gas/currently_delivered",
name="Current gas usage",
icon="mdi:fire",
device_class=DEVICE_CLASS_GAS,
native_unit_of_measurement=VOLUME_CUBIC_METERS,
state_class=STATE_CLASS_MEASUREMENT,
),