Air Quality Cluster
Cluster ID: 0x005B |
Endpoint: Application endpoint (typically Endpoint 1 or the endpoint corresponding to the air quality sensor)
The Air Quality Cluster provides a comprehensive air quality index as an enum value that reflects the overall air condition of the current environment. This is a minimal read-only cluster — it has only 1 attribute, no commands, and no Feature Map.
Air Quality provides an overall rating level and does not include specific pollutant concentration data.
In practice, it typically appears alongside concentration measurement clusters such as PM2.5 Concentration Measurement (0x042A),
CO2 Concentration Measurement (0x040D), and TVOC Concentration Measurement (0x042E).
Those clusters provide precise values, while Air Quality provides an at-a-glance level assessment.
Attribute Overview
The Air Quality Cluster has only one attribute.
| ID | Name | Type | Access | Description |
|---|---|---|---|---|
0x00 |
AirQuality | AirQualityEnum | Read-only | Current overall air quality level |
AirQuality (Air Quality Level)
A read-only attribute indicating the device's current overall air quality level. Values range from 0 (Unknown) to 6 (ExtremelyPoor), covering 7 levels in total.
The device computes and reports this value based on its built-in sensor readings; the specific calculation algorithm is determined by the device manufacturer.
Unknown (0) means the device currently cannot determine the air quality level (e.g., the sensor is warming up, calibrating, or lacks sufficient data).
It does not mean the device is offline or malfunctioning. Apps should display this as "Detecting" or "No data yet," not as an error state.
AirQualityEnum Enum Values
Commands
The Air Quality Cluster is purely read-only and has no commands. Apps can only obtain air quality data by reading attributes or subscribing to reports — they cannot send control commands to the device.
Example Data
Reading the Air Quality Cluster attributes from an air quality sensor:
{
// --- Attributes ---
"0x0": 1 // AirQuality = Good (air quality is good)
}
Subscribing to air quality changes (recommended approach):
{
"subscribeRequests": [{
"attributePath": {
"endpointId": 1,
"clusterId": "0x005B",
"attributeId": "0x00" // AirQuality
},
"minInterval": 10, // Minimum reporting interval: 10 seconds
"maxInterval": 60 // Maximum reporting interval: 60 seconds
}]
}
Air quality is a continuously changing metric. Rather than reading periodically, use Subscribe to have the device proactively report when values change.
Setting appropriate minInterval and maxInterval values balances real-time responsiveness with power consumption.
Scenario 1: Air Purifier Automation
The air quality sensor and purifier work together: the purifier automatically turns on when the sensor detects worsening air quality, and turns off when conditions improve.
- Subscribe to the air quality sensor's
AirQualityattribute changes -
Upon receiving a report, take action based on the level:
Moderate (3)or above: send the On/Off Cluster On command to turn on the purifierGood (1): send the Off command to turn off the purifierFair (2): maintain the current state to avoid frequent switching
- You can also use the Level Control Cluster to adjust purifier fan speed —
Poor (4)for high speed,Moderate (3)for low speed
This logic can be implemented on the app side, or pushed to a Hub/Bridge via Matter automation rules, which allows it to run without the app being online.
Scenario 2: Dashboard Display
Visualize air quality levels in a smart home app, typically presented alongside concentration measurement data.
-
Use colors to differentiate levels (following common AQI color schemes):
Good→ GreenFair→ YellowModerate→ OrangePoor→ RedVeryPoor→ PurpleExtremelyPoor→ Maroon
- Display
Unknownin gray with the text "Detecting" to avoid users mistaking it for an error -
Below the level card, show specific concentration data (from companion clusters):
- PM2.5 Concentration (
0x042A) - CO2 Concentration (
0x040D) - TVOC Concentration (
0x042E)
- PM2.5 Concentration (
- Include a historical trend chart so users can see how air quality changes over time