esphome-docs/components/sensor/sht3xd.rst

86 lines
3.4 KiB
ReStructuredText
Raw Normal View History

2018-05-14 21:15:49 +02:00
SHT3X-D Temperature+Humidity Sensor
2018-05-16 20:02:48 +02:00
===================================
2018-05-14 21:15:49 +02:00
2018-11-14 22:12:27 +01:00
.. seo::
2024-03-28 03:19:30 +01:00
:description: Instructions for setting up SHT31-D/SHT3x and SHT85 temperature and humidity sensors
2018-11-14 22:12:27 +01:00
:image: sht3xd.jpg
The ``sht3xd`` sensor platform Temperature+Humidity sensor allows you to use your Sensirion SHT31-D/SHT3x
2018-05-14 21:15:49 +02:00
(`datasheet <https://cdn-shop.adafruit.com/product-files/2857/Sensirion_Humidity_SHT3x_Datasheet_digital-767294.pdf>`__,
2024-03-28 03:19:30 +01:00
`Adafruit`_ ) and SHT85 (`datasheet <https://sensirion.com/media/documents/4B40CEF3/640B2346/Sensirion_Humidity_Sensors_SHT85_Datasheet.pdf>`__,
`Sensirion`_ ) sensors with Esphome.
The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.
2018-05-14 21:15:49 +02:00
.. _Adafruit: https://www.adafruit.com/product/2857
2024-03-28 03:19:30 +01:00
.. _Sensirion: https://sensirion.com/products/catalog/SHT85/
2018-05-14 21:15:49 +02:00
2018-06-01 18:10:00 +02:00
.. figure:: images/temperature-humidity.png
:align: center
:width: 80.0%
2018-05-14 21:15:49 +02:00
.. code-block:: yaml
2018-05-14 21:15:49 +02:00
# Example configuration entry
sensor:
- platform: sht3xd
temperature:
name: "Living Room Temperature"
humidity:
name: "Living Room Humidity"
address: 0x44
2019-01-06 18:56:14 +01:00
update_interval: 60s
2018-05-14 21:15:49 +02:00
Configuration variables:
2018-08-24 22:44:01 +02:00
------------------------
2018-05-14 21:15:49 +02:00
2024-03-28 03:19:30 +01:00
- **temperature** (*Optional*): The information for the temperature sensor.
2018-06-01 18:10:00 +02:00
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
2019-02-17 12:28:17 +01:00
- All other options from :ref:`Sensor <config-sensor>`.
2018-06-01 18:10:00 +02:00
2024-03-28 03:19:30 +01:00
- **humidity** (*Optional*): The information for the humidity sensor.
2018-06-01 18:10:00 +02:00
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
2019-02-17 12:28:17 +01:00
- All other options from :ref:`Sensor <config-sensor>`.
2018-06-01 18:10:00 +02:00
- **address** (*Optional*, int): Manually specify the I²C address of the sensor.
2024-03-28 03:19:30 +01:00
Defaults to ``0x44``. For SHT3x, an alternate address can be ``0x45`` while SHT85 supports only address ``0x44``
2018-06-01 18:10:00 +02:00
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
2019-01-06 18:56:14 +01:00
sensor. Defaults to ``60s``.
- **heater_enabled** (*Optional*, bool): Turn on/off heater at boot.
2023-10-12 04:12:41 +02:00
This may help provide `more accurate readings in condensing conditions <https://forum.arduino.cc/t/atmospheric-sensors-in-condensing-conditions/412167>`_,
but can also increase temperature readings and decrease humidity readings as a side effect.
Defaults to ``false``.
2018-06-01 18:10:00 +02:00
I²C Configuration when using Higher I²C Frequencies
---------------------------------------------------
When using the **IDF framework** and **I²C frequencies greater than 50-100kHz**, the I²C configuration needs to include a **timeout** option.
On an ESP32, the Arduino framework has a default I²C timeout of 50ms whereas on IDF framework, the default timeout is 100us.
At these higher I²C frequencies, the default I²C timeout on IDF framework causes a "Communication with SHT3xD failed" error on setup.
A solution that has been tested on ESP32 at 800kHz, is to increase the I²C timeout to 10ms as per the following example.
.. code-block:: yaml
# Example I²C configuration
i2c:
sda: 21
scl: 22
scan: true
frequency: 800khz
timeout: 10ms
2018-06-01 18:10:00 +02:00
See Also
2018-08-24 22:44:01 +02:00
--------
2018-06-01 18:10:00 +02:00
- :ref:`sensor-filters`
- :doc:`absolute_humidity`
2018-06-01 18:10:00 +02:00
- :doc:`dht`
- :doc:`dht12`
- :doc:`hdc1080`
- :doc:`htu21d`
2019-05-12 22:44:59 +02:00
- :apiref:`sht3xd/sht3xd.h`
- :ghedit:`Edit`