English
English
简体中文
日本語

PM2.5 Air Quality Kit (SHT30) Home Assistant Integration

This section describes how to integrate the PM2.5 Air Quality Kit-SHT30 air quality monitoring kit with Home Assistant and display data on the LCD screen.

1. Preparation

Environment Setup

  1. Install Home Assistant by following the official Home Assistant documentation.
  2. Install the ESPHome Device Builder add-on by following the official ESPHome documentation. (Note: This tutorial is based on ESPHome 2025.9.0. If you encounter compilation or upload issues, switch to this version for verification.)

Hardware

References

2. Online Flashing

Click the Online Flashing button below and follow the prompts to flash the firmware and configure Wi-Fi, allowing you to quickly try the PM2.5 Air Quality Kit-SHT30 with Home Assistant.

For detailed flashing and configuration instructions, see Online ESPHome Firmware Flashing and Configuration.

After completing online flashing, skip the "Firmware Compilation & Flashing" section and continue directly with 4. Getting Started.

3. Firmware Compilation & Flashing

This section explains how to recompile the project from the yaml configuration file for secondary development, feature modifications, or adding new features.

Compilation Time
The first compilation may take a long time, depending on the performance of the Home Assistant host and network quality.

Create Device

  1. Open ESPHome Builder, click NEW DEVICE in the bottom right corner to create a new device.

  2. Click CONTINUE in the pop-up window.

  3. Select New Device Setup to create a new configuration file.

  4. Fill in the configuration file name.

  5. Select the device type: first uncheck Use recommended settings, then click ESP32, and select M5Stack Core ESP32.

  6. Copy the API Encryption Key for backup, then click SKIP.

Modify Configuration

  1. Click EDIT on the generated configuration file card to edit it.

  2. Add the following to the end of the file:

    yaml
    1 2
    packages:
      m5stack.pm2_5-air-quality-kit: github://m5stack/esphome-yaml/common/pm2_5-air-quality-kit-base.yaml@main
  3. Click SAVE and INSTALL in the upper-right corner, then select Manual download from the installation options.

  4. After compilation is complete, click the Download button and select Factory Format to download the firmware.

Flash Firmware

  1. Download Firmware: Download the Factory Format firmware via the Manual download method in ESPHome Builder.

  2. Flash the firmware using ESPHome Web:

    • Connect the kit to the computer using a USB Type-C cable, open ESPHome Web, and click CONNECT to connect the device.

    • Click INSTALL and select the previously compiled firmware to upload.

    • Click INSTALL again to flash, and wait for the process to complete.

4. Getting Started

  1. After flashing the firmware, the device will automatically connect to Wi-Fi upon startup. The Home Assistant service will automatically discover the new device. Select the new device in Notifications and click Check it out -> CONFIGURE. Follow the steps in the pop-up window to add the device to a specified area to complete the configuration.

  2. If no notification for the new device appears, navigate to Settings > Devices & Services to check the device status. Click Add to add the device to Home Assistant.

  3. Dashboard Example:

  4. At the same time, the buttons on the Basic host can switch pages to display more information.

LCD Display Page 1 LCD Display Page 2 LCD Display Page 3
Usage Tip
1. The time displayed on the LCD screen comes from Home Assistant and synchronizes automatically after connecting to Home Assistant.
2. Sensor data requires a period of sampling before it can be displayed on the screen.

5. Video

Page Tools
PDF
On This Page