Documentation for `ens160` component (#2931)

* Create ens160.rst

Add ens160

* Update index.rst

* Update index.rst

* Add ens160 image

* Add files via upload

* Delete ens160.jpg

* Add files via upload

* Update ens160.rst

* Add files via upload

* Update ens160.rst

* Update ens160.rst

* Update ens160.rst

* Update ens160.rst

A few extra bits of information about 1 sec measurement frequency and compensation

* Update ens160.rst

fixing a few mistakes and omission

* Update ens160.rst

* Update ens160.rst

* Update components/sensor/ens160.rst

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>

* Update components/sensor/ens160.rst

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>

* Update components/sensor/ens160.rst

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>

* Update components/sensor/ens160.rst

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>

* Update components/sensor/ens160.rst

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>

* Update components/sensor/ens160.rst

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>

* Update index.rst

---------

Co-authored-by: mrtoy-me <118446898+mrtoy-me@users.noreply.github.com>
Co-authored-by: H. Árkosi Róbert <robreg@zsurob.hu>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
Vincent Schmandt 2023-11-24 05:31:21 +01:00 committed by GitHub
parent be2bbb0b0c
commit 10bdd79d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,110 @@
ENS160 Sensor
=============
.. seo::
:description: Instructions for setting up ENS160 air-quality sensors
:keywords: ENS160
The ``ens160`` sensor platform allows you to use your ENS160
(`datasheet <https://www.sciosense.com/wp-content/uploads/documents/SC-001224-DS-7-ENS160-Datasheet.pdf>`__) air-quality sensors with ESPHome. The :ref:`I²C <i2c>` component is
required to be set up in your configuration for this sensor to work.
.. note::
On first power-up of the ENS160 sensor, there is a 1 hour initial startup delay before readings will be available.
For subsequent starts or reboots, there is a 3 minute warm up period before readings are available. Also, be aware that the
ENS160 can take up to 1 second for sucessive data measurements to be ready.
.. figure:: images/ens160.jpg
:align: center
:width: 80.0%
ENS160 Air Quality Sensor.
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: ens160
eco2:
name: "ENS160 eCO2"
tvoc:
name: "ENS160 Total Volatile Organic Compounds"
aqi:
name: "ENS160 Air Quality Index"
update_interval: 60s
address: 0x53
compensation:
temperature: id_temperature_sensor
humidity: id_humidity_sensor
Configuration variables:
------------------------
- **eco2** (**Required**): Configuration for the eCO2 sensor.
- **name** (**Required**, string): The name for the eCO2 sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **tvoc** (**Required**): Configuration for the TVOC sensor.
- **name** (**Required**, string): The name for the TVOC sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **aqi** (*Optional*): Configuration for the air quality index sensor.
- **name** (**Required**, string): The name for the AQI sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``. The update interval should be greater than the measurement
frequency of the ENS160 which is up to 1 second.
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.
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.
- **temperature** (**Required**, :ref:`config-id`): The ID of an external temperature sensor.
- **humidity** (**Required**, :ref:`config-id`): The ID of an external humidity sensor.
Example Text Sensor configuration
---------------------------------
The Air Quality Index(AQI) from this sensor is a number between 1 and 5. The ENS160
(`datasheet <https://www.sciosense.com/wp-content/uploads/documents/SC-001224-DS-7-ENS160-Datasheet.pdf>`__) states that
"The AQI-UBA air quality index is derived from a guideline by the German Federal Environmental
Agency based on a TVOC sum signal". The following is an example configuration to convert the numeric ENS160 AQI to the rating text.
.. code-block:: yaml
text_sensor:
- platform: template
name: "ENS160 Air Quality Rating"
lambda: |-
switch ( (int) (id(ens160_air_quality_index).state) ) {
case 1: return {"Excellent"};
case 2: return {"Good"};
case 3: return {"Moderate"};
case 4: return {"Poor"};
case 5: return {"Unhealthy"};
default: return {"Not Available"};
}
See Also
--------
- :ref:`sensor-filters`
- :doc:`ccs811`
- :doc:`sgp30`
- :apiref:`ens160/ens160.h`
- :ghedit:`Edit`

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

BIN
images/ens160.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -182,6 +182,7 @@ Air Quality
AirThings BLE, components/sensor/airthings_ble, airthings_logo.png, Radon, CO2, Volatile organics
CCS811, components/sensor/ccs811, ccs811.jpg, CO2 & Volatile organics
EE895, components/sensor/ee895, EE895.png, CO2 & Temperature & Pressure
ENS160, components/sensor/ens160, ens160.jpg, CO2 & Air Quality
GCJA5, components/sensor/gcja5, gcja5.svg, Particulate
HM3301, components/sensor/hm3301, hm3301.jpg, Particulate
MH-Z19, components/sensor/mhz19, mhz19.jpg, CO2 & Temperature
@ -309,6 +310,7 @@ Environmental
DHT12, components/sensor/dht12, dht12.jpg, Temperature & Humidity
DPS310, components/sensor/dps310, dps310.jpg, Temperature & Pressure
EMC2101, components/emc2101, emc2101.jpg, Temperature
ENS160, components/sensor/ens160, ens160.jpg, CO2 & Air Quality
ENS210, components/sensor/ens210, ens210.jpg, Temperature & Humidity
HDC1080, components/sensor/hdc1080, hdc1080.jpg, Temperature & Humidity
HTE501, components/sensor/hte501, HTE501.png, Temperature & Humidity