SGP41 VOC and NOx Sensor
Overview
| Name | SGP41 |
| Manufacturer | Sensirion |
| Datasheet | Sensirion_Gas_Sensors_Datasheet_SGP41.pdf |
| ESPHome component | sgp4x |
| Interface | |
| I²C address | 0x591 |
| Supply voltage | Sensor: |
This sensor does not output aboslute values of or , but instead it reports an index value for 2 and 3.
For more details, see the datasheet.
ESPHome config
Set up an an I²C bus first.
i2c:
- id: i2c_sgp4x
sda: ${gpio_sda}
scl: ${gpio_scl}
And use the sgp4x component4 to configure sensors for voc
and nox:
sensor:
- platform: sgp4x
i2c_id: i2c_sgp4x
address: 0x59
store_baseline: "${sgp4x_store_baseline}"
voc:
id: voc
name: "VOC"
icon: "mdi:air-filter"
device_class: aqi
state_class: measurement
unit_of_measurement: "index points"
nox:
name: "NOx"
id: nox
device_class: aqi
state_class: measurement
unit_of_measurement: "index points"
update_interval: 60s
This sensor operates on cycles and will be read out on device once per second. However
the update_interval config for the sgp4x component will only affect how often the state
is reported (defaults to 60s).
Calibration config
store_baseline: The baseline values are persistently stored on the sensor and applied when the sensor boots. Cleared after OTA.vocindex_offset: index representing typical conditons, used as an offset.
noxindex_offset: index representing typical conditons, used as an offset.
compensation: Used to calculate absolute humidity for the sensor to imrove the internal operations of the sensor.temperature_source: ESPHomeidfor a temperature sensor (reporting in Celsius).humidity_source: ESPhomeidfor a (relative) humidity sensor.
There are some calibration settings for this sensor:
sensor:
- platform: sgp4x
# ...
store_baseline: true
voc:
index_offset: 100
nox:
index_offset: 100
compensation:
temperature_source: esphome_temperature_sensor
humidity_source: esphome_humidity_sensor
If store_baseline is set to true the calibration settings are saved on the
sensor and loaded on boot.