:description:Instructions for setting up SCD4X CO₂ Temperature and Relative Humidity Sensor
:image:scd4x.jpg
The ``scd4x`` sensor platform allows you to use your Sensirion SCD4X CO₂
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/9.5_CO2/Sensirion_CO2_Sensors_SCD4x_Datasheet.pdf>`__) sensors with ESPHome.
The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.
..figure:: images/scd4x.jpg
:align:center
:width:80.0%
..code-block:: yaml
# Example configuration entry
sensor:
- platform: scd4x
co2:
name: "Workshop CO2"
temperature:
name: "Workshop Temperature"
humidity:
name: "Workshop Humidity"
Configuration variables:
------------------------
-**co2** (*Optional*): The information for the CO₂ sensor.
-**name** (**Required**, string): The name for the CO₂eq sensor.
-**id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
-**temperature** (*Optional*): The information for the Temperature sensor.
-**name** (**Required**, string): The name for the temperature sensor.
-**id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
-**humidity** (*Optional*): The information for the Humidity sensor.
-**name** (**Required**, string): The name for the humidity sensor.
-**id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
-**temperature_offset** (*Optional*, float): The temperature offset can depend
on various factors such as the SCD4x measurement mode, self-heating of close
components, the ambient temperature and air flow. This variable allows the
compensation of those effects by setting a temperature offset. Defaults to
-``periodic``: The sensor takes a new measurement every 5 seconds. This is the default mode.
-``low_power_periodic``: The sensor takes a new measurement every 30 seconds. Make sure ``update_interval`` is at least 30 seconds.
-``single_shot``: A measurement is started in every update interval. A measurement takes 5 seconds. This mode is only available on scd41 and useful if low power consumption is required.
-``single_shot_rht_only``: A measurement is started in every update interval. A measurement takes 50 ms. Only humidity and temperature is measured. CO2 is reported as 0 ppm. This mode is only available on scd41 and useful if low power consumption is required.
This :ref:`action <config-action>` manually calibrates the sensor to the provided value in ppm.
Operate the SCD4x in the operation mode later used in normal sensor operation (periodic measurement, low power periodic measurement or single shot) for > 3 minutes in an environment with homogenous and constant CO2 concentration before performing a forced recalibration.
As of April 2022 the average fresh air Co² concentration is 419 ppm.