[RELEASE] Virtual Air Quality Sensor

A simple driver that accepts a numeric value and presents it as an Air Quality Value

Useful for integrating Air Quality into Homekit

Make sure you remove the temperature capability from the integrated sensor as temperature measurement is not implemented.

Use custom attribute to update the value.

The value can be specified or manually overwritten for testing purposes.

Homekit thresholds and values:

< 0 Unknown (Out of range)
0-50 Excellent
51-100 Good
101-150 Fair
151-200 Inferior
201-500 Poor
> 500 Unknown (Out of range)
5 Likes

Very useful for Xiaomi Air Purifier HomeKit integration.
You can add the air purifier in HomeKit Integration as a switch, temperature and humidity sensor, but fineDust level is missing.
I've used a local variable to pass the value from fineDust and then i passed it to the Virtual Air Quality Sensor whitch can be integrated as an Air Quality Sensor and it shows the thresholds in HomeKit.

For this integration i have used mi-connector on a RaspberryPi4.

1 Like

Is there a chance to add to that driver parser from remote json data file where air quality value is stored ? For example with 120s data refresh rate

You can use jq to parse the json values (on a separate device like a raspberry pi) and automate refresh push to the MakerAPI

Maybe but it will be another point of failure. Is there another way?

I know HE is capable of HTTP Get and Post via Rule Machine but not sure if that would work for you …