AirGradient Forum

HomeAssistant addon wrong PM values when Airgradient dashboard is OK

This should help

Check out Set Configuration Parameters.

Looks like you want to set your display to show the compensated values and you may want to enable the compensations, as it is recommended.

The Dashboard is both for viewing graphs but it also does all of the configuration of your ConfigurationControl is set to Cloud. This makes it easier to see and set your config.

When you add to Home Assistant it changes the Configuration control to local so HA can configure the setting all locally or you can use Curl.

So it depends on how you want to manage it.

You can use the dashboard and cloud control and still get local graphs in Home Assistant

2 Likes

Thanks!

I have now set “monitorDisplayCompensatedValues” to “true” in “/config”, and will check using “/measures/current” if I see any further discrepancies, but it sounds like this was what I was missing - i.e. the device display was showing the raw values while the HA entities were using the compensated values.

If this was my issue, I would suggest that “monitorDisplayCompensatedValues” is set to true by default, or perhaps it’s added as something that people might want to configure when they integrate with Home Assistant in the HA documentation here:

Better still, it could be configured automatically by the integration, maybe as part of the “config flow” setup in HA with a (default ticked) checkbox to “show matching compensated values on display” (or something along those lines) and the same option being made available to set/change in the HA device page for the AirGradient (i.e. like the “Post data to Airgradient” option in the Configuration on the device page, there would be a “Show compensated values on monitor display” checkbox as well).

PS: It would be useful if the local server API documentation was linked from the main AirGradient website, perhaps on this page:
https://www.airgradient.com/integrations/

Following up on this as I must still be missing something (maybe the “corrections” object?); I have “monitorDisplayCompensatedValues” set to true in /config, but I’m still seeing inconsistent values between the physical display on my AirGradient device, the Home Assistant entity and even those reported on /measures/current.

For example, here were the values I observed earlier today for PM2.5 (ug/m3):

  • device display: 18; Home Assistant: 11.02; /measures/current: “pm02” 18.17 “pm02Standard” 18.17 “pm02Compensated” 11.19
  • device display: 21; Home Assistant: 11.82; /measures/current: “pm02” 18.33 “pm02Standard” 18.33 “pm02Compensated” 11.27

It appears that the device display is generally closer to the “raw” or “standard” (uncompensated?) values, whereas HA is closer to the “compensated”, but it doesn’t align perfectly and the inconsistency between the device display and HA makes me question which one I should use as they can’t both be correct. In any case, I would suggest that the default behaviour should be that the (main) HA entity matches what is shown on the device display, and if there are other values (raw/compensated/etc.) they can have separate entities in HA.