From 6d61a4678db2848dda321936792fea5fa59c204b Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 9 Dec 2021 08:29:47 +0100 Subject: [PATCH] Ues new SensorDeviceClass in bme680 (#61318) Co-authored-by: epenet --- homeassistant/components/bme680/sensor.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/bme680/sensor.py b/homeassistant/components/bme680/sensor.py index 6c32639fdb4..84a1b613a23 100644 --- a/homeassistant/components/bme680/sensor.py +++ b/homeassistant/components/bme680/sensor.py @@ -11,15 +11,13 @@ import voluptuous as vol from homeassistant.components.sensor import ( PLATFORM_SCHEMA, + SensorDeviceClass, SensorEntity, SensorEntityDescription, ) from homeassistant.const import ( CONF_MONITORED_CONDITIONS, CONF_NAME, - DEVICE_CLASS_HUMIDITY, - DEVICE_CLASS_PRESSURE, - DEVICE_CLASS_TEMPERATURE, PERCENTAGE, TEMP_CELSIUS, ) @@ -65,19 +63,19 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( key=SENSOR_TEMP, name="Temperature", native_unit_of_measurement=TEMP_CELSIUS, - device_class=DEVICE_CLASS_TEMPERATURE, + device_class=SensorDeviceClass.TEMPERATURE, ), SensorEntityDescription( key=SENSOR_HUMID, name="Humidity", native_unit_of_measurement=PERCENTAGE, - device_class=DEVICE_CLASS_HUMIDITY, + device_class=SensorDeviceClass.HUMIDITY, ), SensorEntityDescription( key=SENSOR_PRESS, name="Pressure", native_unit_of_measurement="mb", - device_class=DEVICE_CLASS_PRESSURE, + device_class=SensorDeviceClass.PRESSURE, ), SensorEntityDescription( key=SENSOR_GAS,