Homebridge plug-in for Airrohr

Hey there. Does anyone else use the Airrohr Homebridge plug-in? It works well but the classification of the air quality is quite…arbitrary. I can see in the code how I would like to change it but not sure how I then go about making my changes into a new plug-in for Homebridge.

Right now it defines a couple of limits I think it’s 15 for PM2.5 and 25 for PM10 but I’d have to confirm that. It then decides what percentage of each the actual reading is. If the reading is 0-20% the air is ‘Excellent’, 20-40% the air is ‘Good’ etc. You can then use these (five) ratings to trigger events in Apple HomeKit.

I’d like this to just use PM2.5 and to have breakpoints at 5 (WHO annual level), 10 a target suggested for the UK by 2030/2040, 20 the current annual average etc.

The code looks easy to change but I’d like to know how to make a new plug-in with the modified code.

I’m currently having to use the Eve app and it’s a bit tedious to do this for so many sensors!