Air Quality Sensor Trait
API Service: AirQualitySensorApi
Trait for devices that can report either numeric or descriptive readings about air quality and comfort.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| GetAirQuality | GetAirQualityRequest | AirQuality | Get the current state of all reading this device supports |
| PullAirQuality | PullAirQualityRequest | PullAirQualityResponse stream | Be notified of changes to any reading |
Info Service: AirQualitySensorInfo
Describes the capabilities of a specific named device with respect to this trait.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| DescribeAirQuality | DescribeAirQualityRequest | AirQualitySupport | Get information about how a named device implements AirQuality measurements |
AirQuality
AirQuality holds the value of all supported sensors.
| Field Name | Type | Description |
|---|---|---|
| carbon_dioxide_level | float | The CO2 level in parts per million |
| volatile_organic_compounds | float | The VOC level in parts per million |
| air_pressure | float | The air pressure in hPa |
| comfort | AirQuality.Comfort | General comfort of the area |
| infection_risk | float | A percentage [0,100] reading for how infectious the air is. Typically a combination of other sensor readings, the combination algorithm is undefined. |
| score | float | An air quality score for the area mapped to a percentage [0,100], with 100 being the best quality. |
| particulate_matter_1 | float | A measure of particles in the air measuring 1 micron or less in size, in micrograms per cubic meter. |
| particulate_matter_25 | float | A measure of particles in the air measuring 2.5 microns or less in size, in micrograms per cubic meter. |
| particulate_matter_10 | float | A measure of particles in the air measuring 10 microns or less in size, in micrograms per cubic meter. |
| air_change_per_hour | float | The number of times per hour the air in the area is replaced. |
AirQuality.Comfort
Comfort encodes levels of comfort for an area.
| Name | Number | Description |
|---|---|---|
| COMFORT_UNSPECIFIED | 0 | The comfort level is unknown |
| COMFORTABLE | 1 | The area should be comfortable for occupants |
| UNCOMFORTABLE | 2 | The area might be uncomfortable for occupants |
AirQualitySupport
AirQualitySupport describes the capabilities of devices implementing this trait
| Field Name | Type | Description |
|---|---|---|
| resource_support | smartcore.types.ResourceSupport | How a named device supports read/pull apis |
| carbon_dioxide_level | smartcore.types.FloatBounds | If present then the sensor supports reporting CO2 levels, in parts-per-million. |
| volatile_organic_compounds | smartcore.types.FloatBounds | If present then the sensor supports reporting volatile organic compounds, in parts-per-million. |
| air_pressure | smartcore.types.FloatBounds | If present then the sensor supports reporting air pressure, in hPa. |
| comfort | repeated AirQuality.Comfort | If non-empty then the sensor supports reporting a general comfort reading of any of the provided types. Unknown should be assumed to be present if supported. |
| infection_risk | smartcore.types.FloatBounds | If present then the sensor supports reporting infection risk, as a percentage [0,100]. |
| score | smartcore.types.FloatBounds | If present then the sensor supports reporting an air quality score, as a percentage [0,100]. |
| particulate_matter_1 | smartcore.types.FloatBounds | If present then the sensor supports reporting particulate matter 1, in micrograms per cubic meter. |
| particulate_matter_25 | smartcore.types.FloatBounds | If present then the sensor supports reporting particulate matter 2.5, in micrograms per cubic meter. |
| particulate_matter_10 | smartcore.types.FloatBounds | If present then the sensor supports reporting particulate matter 10, in micrograms per cubic meter. |
| air_change_per_hour | smartcore.types.FloatBounds | If present then the sensor supports reporting air changes per hour. |
GetAirQualityRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | The name of the device to request state from |
| read_mask | google.protobuf.FieldMask | The state fields to fetch |
PullAirQualityRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | The name of the device to request state from |
| read_mask | google.protobuf.FieldMask | The state fields to pull |
| updates_only | bool | When true the device will only send changes to the resource value. The default behaviour is to send the current value immediately followed by any updates as they happen. |
PullAirQualityResponse
| Field Name | Type | Description |
|---|---|---|
| changes | repeated PullAirQualityResponse.Change |
PullAirQualityResponse.Change
| Field Name | Type | Description |
|---|---|---|
| name | string | The name of the device that has changed. |
| change_time | google.protobuf.Timestamp | The time the change happened. |
| air_quality | AirQuality | The new state of the sensor. Changed fields should be reported via the update_mask property. |
| update_mask | google.protobuf.FieldMask | The state fields that have changed. |
DescribeAirQualityRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | The name of the device |