AirGradient Forum

Home Assistant error: Failed setup, will retry: Field "led_bar_mode" of type LedBarMode in Config has invalid value None

My I-9PSL is having issues starting in home assistant with the error Failed setup, will retry: Field "led_bar_mode" of type LedBarMode in Config has invalid value None. There are many other users reporting the same issue in AirGradient integration not able to start · Issue #168434 · home-assistant/core · GitHub

I briefly looked into this but wasn’t able to track down the root cause. It seems like AirGradient devices can return duplicate ledBarMode fields from /config; the first value is valid, but the later duplicate is null, which causes python-airgradient to parse the final value as None and fail.

curl http://192.168.3.57/config

Simplified response from my device:

{
"configurationControl": "local",
"temperatureUnit": "f",
"ledBarMode": "co2",
"model": "I-9PSL",
"extendedPmMeasures": false,
"ledBarMode": null
}

Note the duplicate ledBarMode key above. I believe Home Assistant ends up seeing ledBarMode: null instead of ledBarMode: "co2".

Hi @andrewgable - sorry for the inconvenience and thanks for letting us know. I believe this may be related to a new LED bar mode we’ve introduced to support GO AQS (but this is just an assumption at this point). Could you please take a debug log from this page here: Online Debug | AirGradient Knowledge Base and then send it over to us via the support form: https://www.airgradient.com/support/ - this will likely help us with more context.