diff --git a/homeassistant/components/deconz/sensor.py b/homeassistant/components/deconz/sensor.py index 5305ea625b8..6b47560b150 100644 --- a/homeassistant/components/deconz/sensor.py +++ b/homeassistant/components/deconz/sensor.py @@ -33,6 +33,7 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( ATTR_TEMPERATURE, ATTR_VOLTAGE, + CONCENTRATION_PARTS_PER_BILLION, ENERGY_KILO_WATT_HOUR, LIGHT_LUX, PERCENTAGE, @@ -121,8 +122,9 @@ ENTITY_DESCRIPTIONS: tuple[DeconzSensorDescription, ...] = ( instance_check=AirQuality, name_suffix="PPB", old_unique_id_suffix="ppb", - device_class=SensorDeviceClass.AQI, + device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION, ), DeconzSensorDescription[Consumption]( key="consumption", diff --git a/tests/components/deconz/test_sensor.py b/tests/components/deconz/test_sensor.py index ac8100caa3d..d877e63864a 100644 --- a/tests/components/deconz/test_sensor.py +++ b/tests/components/deconz/test_sensor.py @@ -100,12 +100,13 @@ TEST_DATA = [ "old_unique_id": "00:12:4b:00:14:4d:00:07-ppb", "state": "809", "entity_category": None, - "device_class": SensorDeviceClass.AQI, + "device_class": SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, "state_class": SensorStateClass.MEASUREMENT, "attributes": { - "state_class": "measurement", - "device_class": "aqi", + "device_class": "volatile_organic_compounds", "friendly_name": "BOSCH Air quality sensor PPB", + "state_class": "measurement", + "unit_of_measurement": "ppb", }, "websocket_event": {"state": {"airqualityppb": 1000}}, "next_state": "1000",