This section introduces the configuration methods and practical steps for integrating the Unit ENV-Pro environmental sensor into Home Assistant.
Since Unit ENV-Pro is an independent sensor platform, an additional controller (such as the Atom series, Stamp series, Stick series, Core/Basic series, etc.) is required to integrate it into Home Assistant. The above component utilizes the proprietary software BSEC2. The BSEC2 library can only be used after accepting its Software License Agreement. By enabling this component in your configuration, you explicitly agree to the terms of the BSEC license agreement. Please note that this license prohibits the distribution of any compiled firmware binary files containing this component.
Enable the I²C component in the ESPHome configuration:
# Example configuration entry for ESP32
i2c:
sda: GPIOXX
scl: GPIOXX
scan: true The GPIO pins here will vary depending on the controller used. For example, using Atom Lite as the controller:
# I2C Bus on Grove Port (HY2.0-4P)
i2c:
sda: GPIO26
scl: GPIO32 Unit ENV-Pro Configuration Example
bme68x_bsec2_i2c:
address: 0x77
model: bme688text_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"BSEC2 library, the sensor's update_interval configuration option will be unavailable (the polling interval cannot be configured). Data is processed and published by the proprietary library.