Fix tradfri air quality device class (#86861)
This commit is contained in:
parent
ec3475910f
commit
b1e939d1f1
2 changed files with 2 additions and 2 deletions
|
@ -89,9 +89,9 @@ SENSOR_DESCRIPTIONS_FAN: tuple[TradfriSensorEntityDescription, ...] = (
|
|||
TradfriSensorEntityDescription(
|
||||
key="aqi",
|
||||
name="air quality",
|
||||
device_class=SensorDeviceClass.AQI,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
icon="mdi:air-filter",
|
||||
value=_get_air_quality,
|
||||
),
|
||||
TradfriSensorEntityDescription(
|
||||
|
|
|
@ -91,8 +91,8 @@ async def test_air_quality_sensor(hass, mock_gateway, mock_api_factory):
|
|||
assert sensor_1 is not None
|
||||
assert sensor_1.state == "42"
|
||||
assert sensor_1.attributes["unit_of_measurement"] == "µg/m³"
|
||||
assert sensor_1.attributes["device_class"] == "aqi"
|
||||
assert sensor_1.attributes["state_class"] == "measurement"
|
||||
assert "device_class" not in sensor_1.attributes
|
||||
|
||||
|
||||
async def test_filter_time_left_sensor(hass, mock_gateway, mock_api_factory):
|
||||
|
|
Loading…
Add table
Reference in a new issue