CUBIC CM1106 Single Beam NDIR CO2 Sensor Module
The cm1106 sensor platform allows you to use CM1106 CO2 sensors with ESPHome.

Communication with the CM1106 sensor is done via UART, so you need to define a
UART bus in your configuration. Connect the rx_pin to the TX pin of the CM1106
and the tx_pin to the RX pin of the CM1106 (note that the TX/RX labels are from the sensor’s
perspective). Additionally, set the baud rate to 9600 for proper communication.
# Example configuration entrysensor: - platform: cm1106 co2: name: CM1106 CO2 ValueConfiguration variables
Section titled “Configuration variables”-
co2 (Optional): The CO2 data from the sensor in parts per million (ppm). All options from Sensor.
-
update_interval (Optional, Time): The interval to check the sensor. Defaults to
60s. -
uart_id (Optional, ID): Manually specify the ID of the UART Component if you want to use multiple UART buses.
-
id (Optional, ID): Manually specify the ID used for actions.
-
automatic_baseline_calibration (Optional, boolean or mapping): CM1106 has an automatic baseline calibration procedure (ABC). The sensor refreshes the baseline against the lowest reading observed during each calibration cycle; with the default settings a cycle starts 24 hours after the sensor is powered on and then repeats every 15 days. Set this value to
falseto disable ABC on boot. ABC assumes the sensor sees outdoor air (about 400ppm) at some point in every cycle; a room that stays occupied or poorly ventilated never does, so the baseline drifts and readings end up too low. Disabling it is the safer choice for most indoor sensors. Set this value totrueto enable ABC on boot. No calibration command is sent if not set (the sensor’s stored logic is used).- cycle (Optional, int, [1, 90]): Calibration
cycle interval in days. Defaults to
15. - baseline (Optional, int, [400, 10000]): The
reference concentration the baseline is refreshed against, in ppm. Defaults to
400.
Set to
trueto enable ABC on boot with the default cycle and baseline:automatic_baseline_calibration: trueAlternatively, provide a mapping to customize the cycle and baseline; the mapping implicitly enables ABC:
automatic_baseline_calibration:cycle: 7baseline: 420 - cycle (Optional, int, [1, 90]): Calibration
cycle interval in days. Defaults to
cm1106.calibrate_zero Action
Section titled “cm1106.calibrate_zero Action”This action executes zero point calibration command on the sensor with the given ID.
To perform zero-point calibration, the CM1106 sensor must operate in a stable 400ppm CO₂ environment for at least 20 minutes before executing this function.
on_...: then: - cm1106.calibrate_zero: my_cm1106_idYou can provide an action to perform from Home Assistant
api: actions: - action: cm1106_calibrate_zero then: - cm1106.calibrate_zero: my_cm1106_idExamples:
Button to start the calibration process:
button: - platform: template name: "CM1106 Calibration" entity_category: diagnostic on_press: then: - cm1106.calibrate_zero: my_cm1106_idPseudo-automatic calibration by CO2 value:
binary_sensor: - platform: template id: co2_calibration lambda: |- if (id(co2sensor).get_state() < 400) { return true; } else { return false; } filters: - delayed_on: 15min on_press: then: - cm1106.calibrate_zero: my_cm1106_id internal: truecm1106.abc_enable Action
Section titled “cm1106.abc_enable Action”This action enables automatic baseline calibration on the sensor with the given ID.
on_...: then: - cm1106.abc_enable: my_cm1106_idcm1106.abc_disable Action
Section titled “cm1106.abc_disable Action”This action disables automatic baseline calibration on the sensor with the given ID.
on_...: then: - cm1106.abc_disable: my_cm1106_idYou can provide a switch to control ABC from Home Assistant. restore_mode: DISABLED keeps the switch from sending
a command at boot, so the automatic_baseline_calibration setting above stays in charge of the boot state.
switch: - platform: template name: "CM1106 ABC" optimistic: true restore_mode: DISABLED on_turn_on: cm1106.abc_enable: my_cm1106_id on_turn_off: cm1106.abc_disable: my_cm1106_id