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".

1 Like

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.

My issue was fixed via a factory reset, but I’ve asked others who are having the same issue to send debug logs on github.

1 Like

Thank for reporting this @andrewgable. I’ll discuss this with the team and see what we can do to improve our customers’ experience.

May I ask what firmware version your I-9PSL was running on when you saw the duplicated ledBarMode? Thank you in advance!

Firmware version 3.6.2

@andrewgable, thanks for providing us with the info. I will coordinate with our development team and see if there is something to fix on our side, or we’ll have to work with the HA integration team to address this issue. Thank you!