pdf-icon

Unit ENV-Pro Sensor Home Assistant Integration

Unit ENV-Pro is a highly integrated environmental sensing unit based on the BME688 sensor solution. It supports measuring VOC (volatile organic compounds), CO₂ equivalent, indoor air quality (IAQ), temperature, humidity and atmospheric pressure.

This document shows how to integrate Unit ENV-Pro into Home Assistant. Main reference:

Note
Because Unit ENV-Pro is a standalone sensor platform, an additional host device (such as Atom series, Stamp series, Stick series, Core/Basic series, etc.) is required to integrate it into Home Assistant. The referenced component uses the proprietary BSEC2 software; The BSEC2 library is only available for use after accepting its software license agreement. By enabling this component in your configuration, you are explicitly agreeing to the terms of the BSEC license agreement. Note that the license forbids distribution of any compiled firmware binaries that include this component.

Configure the sensor

You need to enable the I²C component in your ESPHome configuration:

yaml
1 2 3 4 5
# Example configuration entry for ESP32
i2c:
  sda: GPIOXX
  scl: GPIOXX
  scan: true

The GPIO pins depend on the host device you use. For example, when using Atom Lite as the host:

yaml
1 2 3 4
# I2C Bus on Grove Port (HY2.0-4P)
i2c:
  sda: GPIO26
  scl: GPIO32

Unit ENV-Pro configuration example

yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
text_sensor:
  - platform: bme68x_bsec2
    iaq_accuracy:
      name: "BME68x IAQ Accuracy"
  - platform: template
    name: "BME68x IAQ Classification"
    lambda: |-
      if ( int(id(iaq).state) <= 50) {
        return {"Excellent"};
      }
      else if (int(id(iaq).state) >= 51 && int(id(iaq).state) <= 100) {
        return {"Good"};
      }
      else if (int(id(iaq).state) >= 101 && int(id(iaq).state) <= 150) {
        return {"Lightly polluted"};
      }
      else if (int(id(iaq).state) >= 151 && int(id(iaq).state) <= 200) {
        return {"Moderately polluted"};
      }
      else if (int(id(iaq).state) >= 201 && int(id(iaq).state) <= 250) {
        return {"Heavily polluted"};
      }
      else if (int(id(iaq).state) >= 251 && int(id(iaq).state) <= 350) {
        return {"Severely polluted"};
      }
      else if (int(id(iaq).state) >= 351) {
        return {"Extremely polluted"};
      }
      else {
        return {"error"};
      }

sensor:
  - platform: bme68x_bsec2
    temperature:
      name: "Temperature"
    pressure:
      name: "Pressure"
    humidity:
      name: "Humidity"
    iaq:
      id: iaq
      name: "IAQ"
    co2_equivalent:
      name: "CO2 Equivalent"
    breath_voc_equivalent:
      name: "Breath VOC Equivalent"
Note
Because this component uses the BSEC2 library, the sensor's update_interval option cannot be used (you cannot configure a polling interval). Data processing and publishing are handled by the proprietary library.

Add the sensor to Home Assistant

After completing configuration and uploading the firmware, add the sensor to Home Assistant.

On This Page