Add an "air quality" box to the dashboard using the OpenWeather API

An idea like that, I saw that openweathermap offers an air quality API (Air Pollution), it would be cool to integrate it with Gladys and be able to have an « air quality » box on the dashboard, a bit in this style:

Yes, I’m in for it since the air quality in Seine-Maritime isn’t often great :joy:

I confirm @jerome! Being in Normandy, I’m in the same situation ^^

By the way @pierre-gilles, this brings me to a question: will this box be open to other integrations? As you know, we are finalizing the Netatmo integration, which includes « healthy home coach » devices that return a healthIndex value ranging from 0 to 4 (Poor, Bad, Acceptable, Pleasant, Healthy). We have integrated this into the « device in room ».

But could this box also be suitable for this? We also have temperature, humidity, CO2, and pressure on these devices. Except for the wind, of course. Adaptable?

What does this « healthIndex » correspond to? Is it per room?

We can make a similar box to manage internal home metrics, but for me, this is a separate development from this box, which is purely for external air quality statistics via an external API. :slight_smile:

By the way, I put this feature in « feature request » because I was thinking about it, but we have dozens/hundreds of other tasks before that, so it’s definitely not for now, I think!

Yes

Yes, in this case, it’s per room since it’s a feature of the « NHC » device.

Indeed, for now, we manage this in a completely different way, so no worries!!^^

The OpenWeather API for pollution returns:

  • an overall air quality index from 1 to 5
  • the concentration of various gases and particles

I would see an option in the weather box:

Perhaps with a display of the details of each measurement (CO2, fine particles, etc.) on mouse hover?

Why not, we can do both :slight_smile:

I think having a dedicated box would also help highlight the feature, I really liked the screenshot I posted earlier!

In the weather box, we won’t be able to fit as much information without it looking overloaded, so we can do: a small text in the weather box in addition, and in addition to that a separate, more complete box

Personally, I prefer the second proposal. But I admit that if there are other additions, it might be a bit too much.

By the way, speaking of the weather box, is it normal for the wind speed to be in m/h? Does it come from the API?

This aligns with what I proposed on the GitHub repository of the project. Basically, I just bought an air quality sensor that is not yet fully supported by Gladys.

I think the Zigbee2mqtt module part is ready, the Gladys core modification is not yet done, and finally, the dashboard part remains.

I think this is another topic, the « Weather » box of the dashboard displays data from the OpenWeather API.

For the Zigbee2mqtt part, if you don’t see anything in the « Room Devices » box, you should check the Zigbee2mqtt integration to see if something is missing on that side :slight_smile:

Edit: I didn’t see the PR on GitHub ([zigbee2mqtt] Add TuYa TS0601_air_quality_sensor and CO2 feature by cicoub13 · Pull Request #1247 · GladysAssistant/Gladys · GitHub), it’s good now, all that’s left is the merge!