This tutorial will introduce how to use the Unit CO2/CO2L sensor to integrate into Home Assistant, achieving real-time monitoring of carbon dioxide, temperature, and humidity.
Unit CO2/CO2L is a standalone sensor platform and requires an additional main controller (such as Atom series, Stamp series, Stick series, Core/Basic series, etc.) to be integrated into Home Assistant.
The I²C component needs to be enabled in the ESPHome configuration:
# Example configuration entry for ESP32
i2c:
sda: GPIOXX
scl: GPIOXX
scan: true The GPIO pins here vary depending on the main controller used. For example, using Atom Lite as the controller:
# I2C Bus on Grove Port (HY2.0-4P)
i2c:
sda: GPIO26
scl: GPIO32 Example configuration for Unit CO2/CO2L:
sensor:
- platform: scd4x
co2:
name: "CO2"
temperature:
name: "Temperature"
humidity:
name: "Humidity"Once added to the Dashboard, you can view the sensor data in Home Assistant.
