AirGradient Forum

Native AirGradient integration with HomeAssistant

@stack
For most of the items you mentioned, now that you are running the stock firmware 3.1.1, the configurations you are looking for are in the AirGradient Dashboard.

From the https://app.airgradient.com/ page, click the three bars menu button in the upper left, then select Place, then “LED & Display” to configure a Night Mode that will turn off/dim the display and LED bar

To initiate a CO2 calibration, from the main Dashboard page, click the three dots button to the far right of a device under the Admin column, and select Edit Location. Check the box to “Request CO2 Calibration” and the command will be sent to the device

Uptime isn’t directly in the Dashboard site, but if you go to the Menu>Hardware page you will be able to see the “Current Boot Count” value go up. There is a bug in the current 3.1.1 firmware so this isn’t working, but I believe it will be included in the next version

To see the LED color numbers (or at least the documentation about them) go to Menu>Support>“More About Monitors LEDs” and you can switch between CO2 and PM2.5.

As Achim said, in the future I think the native HA integration will let you change some of these directly from HA, but until then, you still have options available.

I was delighted to discover native Home Assistant integration. It just showed up in HA and asked me to enable it.

Unfortunately the LED dimming doesn’t work. I tried to dim the LED to 0%. The window tells me the value is saved, but the LED are the same intensity as before. I tried daytime and nighttime settings and I rebooted it, but I can’t dim the LEDs anymore.

Can you please post your exact settings so that we can try and reproduce this?

Just as I was planning to flash ESPHome I am really happy to see the native HomeAssistant integration. This seems much easier, and worked right away. So, thank you!

I would look forward to future development which allows turning off the OLED screen as well as the LEDs. I think someone mentioned that this is in the works in a different thread. This would then be really nice for a bedroom at night, to have HomeAssistant control the LED/OLED schedules.

(I have not tried adjusting LED settings via HomeAssistant.)

Are you trying to adjust the LED dimming in HomeAssistant or in the AirGradient Dashboard site?

As far as I know, you have to adjust it in the AirGradient Dashboard at this time.
If you were adjusting it there, but it wasn’t being reflected on your device, in the HomeAssistant configuration for the AirGradient, you may have to change the Control option from Local to Cloud. I had an error appear when I tried to make this change, but not sure if it actually updated and accepted cloud control or not.

1 Like

I was excited to install firmware 3.11 because the lights being on at night also meant I had to keep my sensors out of the bedrooms. It worked great configured from the web app online.

However, the next day I connected them to Home Assistant and I realized that despite poking around at the web app some more the lights wouldn’t turn off anymore. I just discovered the “Configuration source” option and I tried setting it from Local to Cloud. Like @MallocArray I got an error when I did this.

I’ll see tonight if this actually works.

Thanks for the information. I don’t use the web dashboard, nor do I care to. I was just wanting to let everyone know my HA experiences and what is still missing that I care about. :slight_smile:

Thank you all for the HA work! It’s much appreciated!

All the configurations we currently set in the web dashboard will become available as local HA configurations in the next few releases.

Is that accessible on AG web Monitor.

How can I get to it???

Never mind, I found it within ESPHome on my HA.

Hi,

The integration is working great, good job! :slight_smile: I’ve got a question thought - what’s data polling frequency of the HA integration? Can it be customized?

Thank you.

As I can see, the values are updated once a minute by default.

The same question.

I think currently it’s not adjustable. Would you need a much faster frequency?

Not much. But it would be nice to have, for example, 4 times a minute.
I use CO2 sensors to automate ventilation. I try to analyze not only the current value, but also average and trend. Once a minute is a little bit rare.

Please open an issue on our HA github.

Done: Feature request: configuration option for data update frequency · Issue #279 · airgradienthq/python-airgradient · GitHub

Joost already answered. It seems it’s already possible.

I confirm it works.

1 Like

Two more points about update frequency.

  1. For testing I followed the instruction above for one of my ONE devices.
    I disabled default polling in HA.
    I wrote automation that calls homeassistant.update_entity for one of the device sensors every 10 seconds. As I can see, all the device sensors are updated once in 10 seconds now.
    Is that the way I should work, or do I need to list all 33 entities of the device when calling update_entity?

  2. How often are the real measurements made?
    I have IQAir Airvisual device. It makes measurements only once in 3 minutes. I can poll them from HA every second if I want to, but they will always be the same.
    If I poll data from Airgradient device frequently, will every poll return the new measurement? Or the measurements will be made, for example, once in 10 seconds? May be, the answer is different for different sensors?

Can’t answer for 1st point. But for the 2nd, yes device will return a new measurements but the value can be the same (depends on measurements result). The device have a scheduler to read from each sensor (time is different for each sensor), but all scheduled under 10s.

Thanks for your answer.
Where can I find these sensor reading schedules?