AirGradient Forum

AirGradient Open Air O-1PST ESPHome Compile Error

I’m wondering if an ESPHome update has broken the yaml configs for the AirGradient Open Air O-1PST? This is the error I’m getting on my HomeAssistant ESPHome Builder:

INFO ESPHome 2024.12.4
INFO Reading configuration /config/esphome/airgradient-outdoor-aqm.yaml…
Failed config

packages: [source /config/esphome/airgradient-outdoor-aqm.yaml:43]
board: github://airgradienthq/esphome/packages/airgradient_esp32-c3_board.yaml

Failed to load packages. packages/sensor_pms5003t.yaml is not a valid YAML file. Please check the file contents.
while parsing a block mapping
in “/data/packages/4781b3f7/packages/sensor_pms5003t.yaml”, line 52, column 7
expected , but found ‘’
in “/data/packages/4781b3f7/packages/sensor_pms5003t.yaml”, line 53, column 9.
pm_2.5: github://airgradienthq/esphome/packages/sensor_pms5003t.yaml
co2: github://airgradienthq/esphome/packages/sensor_s8.yaml
tvoc: github://airgradienthq/esphome/packages/sensor_sgp41.yaml
airgradient_api: github://airgradienthq/esphome/packages/airgradient_api_esp32-c3.yaml
hardware_watchdog: github://airgradienthq/esphome/packages/watchdog.yaml
wifi: github://airgradienthq/esphome/packages/sensor_wifi.yaml
mac_address: github://airgradienthq/esphome/packages/sensor_mac_address.yaml

I checked the packages/sensor_pms5003t.yaml file and I don’t see any obvious formatting issues on lines 52 or 53…

My yaml config is:

AirGradient Open Air Outdoor Monitor with CO2 and TVOC

Model: O-1PST

The AirGradient Builds Overview

substitutions:
name: “airgradient-open-air”
friendly_name: “AirGradient Open Air”
config_version: 2.0.0
name_add_mac_suffix: “true” # Must have quotes around value

Enable Home Assistant API

api:
encryption:
key: “(redacted)”

ota:

  • platform: esphome
    password: (redacted)

wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
reboot_timeout: 15min

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “${upper_devicename} Hotspot”

esp32_improv: # Uses around 30% of available flash space due to loading BLE stack
authorizer: none

The captive portal is a fallback mechanism for when connecting to the configured WiFi fails.

Captive Portal — ESPHome

captive_portal:

dashboard_import:
package_import_url: github://airgradienthq/esphome/airgradient-open-air-o-1pst.yaml
import_full_config: false

packages:
board: github://airgradienthq/esphome/packages/airgradient_esp32-c3_board.yaml
pm_2.5: github://airgradienthq/esphome/packages/sensor_pms5003t.yaml
co2: github://airgradienthq/esphome/packages/sensor_s8.yaml
tvoc: github://airgradienthq/esphome/packages/sensor_sgp41.yaml
airgradient_api: github://airgradienthq/esphome/packages/airgradient_api_esp32-c3.yaml
hardware_watchdog: github://airgradienthq/esphome/packages/watchdog.yaml
wifi: github://airgradienthq/esphome/packages/sensor_wifi.yaml
mac_address: github://airgradienthq/esphome/packages/sensor_mac_address.yaml
uptime: github://airgradienthq/esphome/packages/sensor_uptime.yaml
safe_mode: github://airgradienthq/esphome/packages/switch_safe_mode.yaml

My HA version info:

  • Core2025.1.4
  • Supervisor2024.12.3
  • Operating System14.2
  • Frontend20250109.2

I’m not sure why you would be encountering issues now, but you are referencing the ESPHome configs in the AirGradient repo, and that was forked from my repository. AirGradient has not been making any modification to it in the last year, but I have continued to modify mine.

You may consider switching out the packages for my repo:
MallocArray/airgradient_esphome: ESPHome definition for an AirGradient DIY device to send data to HomeAssistant and AirGradient servers

Note: I am currently working on something acting up related to switching from the Arduino framework to ESP-IDF, so if you want to be extra safe, do an install by being connected with USB to your ESPHome device for the first flash, since it needs to repartition the internal storage

1 Like

I actually figured that out after I posted last night and have everything working well now. Thank you for the work and for the reply!