pdf-icon

Unit Mini TVOC/eCO2 Home Assistant Integration

This guide shows how to use the Unit Mini TVOC/eCO2 gas sensor unit with an AtomS3R controller and integrate it into Home Assistant for real-time monitoring of TVOC (Total Volatile Organic Compounds) and eCO2 (equivalent CO2) levels.

1. Preparation

  1. Hardware
  1. Software & versions

2. Create Device

  1. Open ESPHome Dashboard. If the initial wizard appears, click CONTINUE.

  1. Click the green + button in the bottom right to create a new device.

  1. Click New Device Setup to enter the device creation wizard.

  1. Enter a device name and click NEXT.

  1. Select the device type and click ESP32S3.

  1. Click SKIP to skip the encryption key setup.

  1. Click EDIT to open the YAML editor and customize the device configuration.

3. Device Configuration

3.1 I2C bus configuration

Add the I2C component to configure communication pins between Unit Mini TVOC/eCO2 and AtomS3R.

i2c:
  sda: GPIO2
  scl: GPIO1
  scan: true
Info
PORT.A on AtomS3R corresponds to SDA: GPIO2 and SCL: GPIO1. Adjust pins if you use a different port.

3.2 Sensor configuration

Add the Sensor component to enable the SGP30 sensor entities.

sensor:
  - platform: sgp30
    address: 0x58
    update_interval: 2s
    store_baseline: true
    # Optional
    # baseline: 
    #   eco2_baseline: 0x190 #400
    #   tvoc_baseline: 0x0   #0
    eco2:
      name: "eCO2"
    tvoc:
      name: "TVOC"

Main parameter descriptions:

Parameter Value Description
address 0x58 I2C address of Unit Mini TVOC/eCO2.
update_interval 2s How often measurements are updated to Home Assistant.
store_baseline true Enable baseline storage to improve long-term accuracy.
baseline Optional Pre-set baseline values; adjust to your environment if needed.
eco2 eCO2 sensor entity Configuration for the eCO2 sensor entity.
tvoc TVOC sensor entity Configuration for the TVOC sensor entity.

4. Download and Flash Firmware

4.1 Build firmware

  1. After editing the YAML, click SAVE in the top right, then click INSTALL.

  1. In the popup dialog select Manual Download.

  1. Wait for compilation to finish, click Download and choose Factory format (Previously Modern) to save the firmware locally.

4.2 Flash firmware

  1. Connect AtomS3R to your computer using a USB Type-C cable. Open ESPHome Web and click CONNECT.

  1. In the serial port selection dialog, select the correct port.

  1. Click INSTALL.

  1. Select the firmware file downloaded in step 3 and start flashing.

!>Warning| After flashing is complete, you must reset the device; otherwise the firmware may not start correctly.

5. Start Using in Home Assistant

  1. In Home Assistant go to Settings > Devices & Services to open the integrations page.

  1. In the Discovered section find Unit Mini TVOC/eCO2, click CONFIGURE and follow the wizard to complete setup.

  1. After the device is added, you will see sensor entities such as eCO2 and TVOC on the device page. Click Add to dashboard to add them to a dashboard.

  1. Finally, add these sensor entities to your dashboard to monitor TVOC and eCO2 levels in real time.

On This Page