This commit is contained in:
Anton Viktorov 2024-05-06 16:56:12 +02:00 committed by GitHub
commit 35be67f63b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 26 additions and 8 deletions

View File

@ -6,8 +6,8 @@ ENS160 Sensor
:keywords: ENS160 :keywords: ENS160
The ``ens160`` sensor platform allows you to use your ENS160 The ``ens160`` sensor platform allows you to use your ENS160
(`datasheet <https://www.sciosense.com/wp-content/uploads/documents/SC-001224-DS-9-ENS160-Datasheet.pdf>`__) air-quality sensors with ESPHome. The :ref:`I²C <i2c>` component is (`datasheet <https://www.sciosense.com/wp-content/uploads/documents/SC-001224-DS-9-ENS160-Datasheet.pdf>`__) air-quality sensors with ESPHome.
required to be set up in your configuration for this sensor to work. The :ref:`I²C <i2c>` or :ref:`SPI <spi>` is required to be set up in your configuration for this sensor to work.
.. note:: .. note::
@ -23,9 +23,9 @@ required to be set up in your configuration for this sensor to work.
.. code-block:: yaml .. code-block:: yaml
# Example configuration entry # Example configuration entry I2C
sensor: sensor:
- platform: ens160 - platform: ens160_i2c
eco2: eco2:
name: "ENS160 eCO2" name: "ENS160 eCO2"
tvoc: tvoc:
@ -37,7 +37,22 @@ required to be set up in your configuration for this sensor to work.
compensation: compensation:
temperature: id_temperature_sensor temperature: id_temperature_sensor
humidity: id_humidity_sensor humidity: id_humidity_sensor
# Example configuration entry SPI
sensor:
- platform: ens160_spi
eco2:
name: "ENS160 eCO2"
tvoc:
name: "ENS160 Total Volatile Organic Compounds"
aqi:
name: "ENS160 Air Quality Index"
update_interval: 60s
cs_pin: GPIO5
compensation:
temperature: id_temperature_sensor
humidity: id_humidity_sensor
Configuration variables: Configuration variables:
------------------------ ------------------------
@ -64,11 +79,14 @@ Configuration variables:
sensor. Defaults to ``60s``. The update interval should be greater than the measurement sensor. Defaults to ``60s``. The update interval should be greater than the measurement
frequency of the ENS160 which is up to 1 second. frequency of the ENS160 which is up to 1 second.
- **address** (*Optional*, int): *I²C only.* Manually specify the I²C address of
the sensor. Defaults to ``0x53``. Another address can be ``0x52``.
- **cs_pin** (*Required*, :ref:`Pin Schema <config-pin_schema>`): *SPI only.* The Chip Select pin.
Advanced: Advanced:
- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x53``. Another address can be ``0x52``.
- **compensation** (*Optional*): The block containing sensors used for compensation. - **compensation** (*Optional*): The block containing sensors used for compensation.
Temperature and humidity compensation improves the accuracy of sensor readings. Without compensation, the Temperature and humidity compensation improves the accuracy of sensor readings. Without compensation, the
ENS160 internally assumes 25°C temperature and 50% humidity, with readings noticeably diverting from real changes without compensation in temperature and humidity. ENS160 internally assumes 25°C temperature and 50% humidity, with readings noticeably diverting from real changes without compensation in temperature and humidity.